When I fill out the form, that should upload a file into server and hit submit, no file appears to the server's temp directory... but the script still echos the temporary file (with the dir) name.
Example:
I choose a file named 'somewhile.jpg'.
Hit submit, and echo $HTTP_POST_FILES['fail']['tmp_name'];
This will output, for example "C:\uploaddir\php5A.tmp" or something...
But there's no files in the dir C:\uploaddir\ and PHP fails to copy the file to destination dir.
I thought there was no purpose to write here the php code, because it all worked on Linux. :S
I am running Apache 1.3
with PHP 4.2.2.
Problem with file upload!
Moderator: General Moderators
Show us the code, please.
Other possible solutions:
1. Check your target directory permissions.
2. Don't use HTTP_POST_FILES. Use the $_FILES['form_name']['info'] global. (http://us3.php.net/manual/en/reserved.v ... bles.files)
A note...
"C:\uploaddir\php5A.tmp"
That would have to be the original location of the file - don't let that fool you in to thinking that's the file's destination. Make sure you check your code for the destination of the file.
Other possible solutions:
1. Check your target directory permissions.
2. Don't use HTTP_POST_FILES. Use the $_FILES['form_name']['info'] global. (http://us3.php.net/manual/en/reserved.v ... bles.files)
A note...
"C:\uploaddir\php5A.tmp"
That would have to be the original location of the file - don't let that fool you in to thinking that's the file's destination. Make sure you check your code for the destination of the file.
Thanks! :)
It's working now!!!
Thank you very much for the $_FILES['form_name']['info'] global!
Cheeerz!
Thank you very much for the $_FILES['form_name']['info'] global!
Cheeerz!