move_uploaded_file probs

getting those standard two errorrrrrrsss

boring me to hell trying to move my file over to a folder, if i dont try and put it in a folder it is fine but when i add the folder it spits at me!

[php] $upload = ‘/uploads’;

if (file_exists($_FILES[“file”][“name”]))
{
echo $_FILES[“file”][“name”] . "

File name already exists, rename it and try again

";
}
else
{
   move_uploaded_file($_FILES["file"]["tmp_name"], "$upload/$name");
   echo "Uploaded File: '$name' to E&S Number: $search <br />";
   }[/php]

I have changed my folder permissions to 777 in hope - no go!

just standard basic code, so I thought…

Warning: move_uploaded_file(/uploads/oil.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in blah blah blah on line 209

php is a pain in my arse!

jesus christ - SORTED IT

[php] $upload = ‘uploads/’ . $name;

if (file_exists($_FILES[“file”][“name”]))
{
echo $_FILES[“file”][“name”] . "

File name already exists, rename it and try again

";
}
else
{
   move_uploaded_file($_FILES["file"]["tmp_name"], $upload);
   echo "Uploaded File: '$name' to E&S Number: $search <br />";
   }[/php]

simple changes EH!!

Sponsor our Newsletter | Privacy Policy | Terms of Service