Jump to content
php.lv forumi

Parse error


king999

Recommended Posts

Macos php, un sanaca shada kluda:

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\wamp\www\upload_file.php on line 30

 

Pats kods ir:

<?

if (($_FILES["file"]["type"] == "image/gif")

|| ($_FILES["file"]["type"] == "image/jpeg")

&& ($_FILES["file"]["size"] < 2000))

{

if ($_FILES["file"]["error"] > 0)

{

echo "Return code: " . $_FILES["file"]["error"] . "<br />";

}

else

{

echo "Augsupladet: " . $_FILES["file"]["name"] . "<br />";

echo "Tips: " . $_FILES["file"]["type"] . "<br />";

echo "Izmers: " . ($_FILES["file"]["size"] / 1024) . "Kb<br />";

echo "Saglabats: " . $_FILES["file"]["tmp_name"];

 

if (file_exists("upload/" . $_FILES["file"]["name"]))

{

echo $_FILES["file"]["name"] . "Jau ir. ";

}

else

{

move_uploaded_file($_FILES["file"]["tmp_name"]

"upload/" . $_FILES["file"]["name"]);

echo "Saglabats: ". "upload/" . $_FILES["file"]["name"];

}

}

}

else

{

echo "nepareizs fails";

}

?>

 

30 rinda ir: "upload/" . $_FILES["file"]["name"]);

 

Nu it kaa tak viss ir kaartiibaa

Link to comment
Share on other sites

×
×
  • Create New...