Chapter 38. Handling file uploads
| From: | Timothy A. Whitley, P.E. | Date: | Fri, 18 Mar 2005 21:43:52 +0000 |
| Subject: | Chapter 38. Handling file uploads | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-211075@lists.php.net to get a copy of this message | ||
I am using the code at the top of this chapter to upload a file and move
to a given destination directory. I get the following error messages and
my file is not to be found. The only thing I am changing is where I want
the file to be stored.
Thanks.
Warning: move_uploaded_file(/images/tim.jpg): failed to open stream: No
such file or directory in
/usr/hsphere/local/home/ice-admi/iceagents.com/CxDatabase/fileuploadh.ph
p on line 20
Warning: move_uploaded_file(): Unable to move '/var/tmp/phpcrIqVo' to
'/images/tim.jpg' in
/usr/hsphere/local/home/ice-admi/iceagents.com/CxDatabase/fileuploadh.ph
p on line 20
Possible file upload attack!
Here is some more debugging info:Array
(
[userfile] => Array
(
[name] => tim.jpg
[type] => image/pjpeg
[tmp_name] => /var/tmp/phpcrIqVo
[error] => 0
[size] => 17024
)
)