Jump to content
php.lv forumi

Recommended Posts

Posted

Taatad probleema taaad, ka uz localhost apache servera skripts stradaa, bet uz nano hostinga nee. Paradaas shis kluudas pazinojums "Pievieno taču bildi!" Iedomajos ka varetu but kaut kas ar php versijaam.

IF (filesize($_FILES["userfile"]["tmp_name"]) < "1048576")
{	
	$imagename = basename($_FILES['bilde']['name']);
	$newimage = "bildes/orginals/" . rand(1, 99999999) . $imagename;
	$result = @move_uploaded_file($_FILES['bilde']['tmp_name'], $newimage);
	IF(empty($result)) {
	echo "Pievieno taču bildi! <a href = 'java script:history.back()'> << Atpakaļ</a>"; }
	else 
	{

Posted

Noņem @ simbolu nost no move_uploaded_file funkcijas.

Un move_uploaded_file fjas rezultāts ir jāpārbauda nevis ar empty, bet gan ar vienādību uz true vai false.

×
×
  • Create New...