file upload warnings

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dapa
Forum Newbie
Posts: 9
Joined: Fri Nov 10, 2006 3:10 pm

file upload warnings

Post by dapa »

please can somebody explain why I am recieving the following warnings when trying to upload files to my remote server?

Warning: move_uploaded_file(/upload_test/Project1.gif) [function.move-uploaded-file]: failed to open stream: No such file or directory in /homepages/45/d187381196/htdocs/upload.php on line 6

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpUMBUPw' to '/upload_test/Project1.gif' in /homepages/45/d187381196/htdocs/upload.php on line 6
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: file upload warnings

Post by Chris Corbyn »

dapa wrote:please can somebody explain why I am recieving the following warnings when trying to upload files to my remote server?

Warning: move_uploaded_file(/upload_test/Project1.gif) [function.move-uploaded-file]: failed to open stream: No such file or directory in /homepages/45/d187381196/htdocs/upload.php on line 6

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpUMBUPw' to '/upload_test/Project1.gif' in /homepages/45/d187381196/htdocs/upload.php on line 6

Code: Select all

var_dump($_FILES);
My guess, you didn't check for errors in $_FILES["foo"]["error"].
dapa
Forum Newbie
Posts: 9
Joined: Fri Nov 10, 2006 3:10 pm

Re: file upload warnings

Post by dapa »

d11wtq wrote:
dapa wrote:please can somebody explain why I am recieving the following warnings when trying to upload files to my remote server?

Warning: move_uploaded_file(/upload_test/Project1.gif) [function.move-uploaded-file]: failed to open stream: No such file or directory in /homepages/45/d187381196/htdocs/upload.php on line 6

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpUMBUPw' to '/upload_test/Project1.gif' in /homepages/45/d187381196/htdocs/upload.php on line 6

Code: Select all

var_dump($_FILES);
My guess, you didn't check for errors in $_FILES["foo"]["error"].
Thanks for the advice however this was not the solution. I have worked out that I had placed a backslash incorrectly in the move_upload_file path.
Post Reply