Hello,
I use the following html and php files to handle file upload.
<form ENCTYPE="multipart/form-data" action=post.php method=post>
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="100000">
Upload Option <input type=file name="picturefile"><br>
<input type=submit>
</form>
and post.php
print $HTTP_POST_FILES['picturefile']['tmp_name'].'<br>';
print $HTTP_POST_FILES['picturefile']['name'].'<br>';
print $HTTP_POST_FILES['picturefile']['type'].'<br>';
print $HTTP_POST_FILES['picturefile']['size'].'<br>';
Everything looks fine. First line prints something like 'c:\tmp\php166.tmp'. All other lines give right information. But file is not appeared in that directory (c:\tmp) and correspondingly
if (!move_uploaded_file($HTTP_POST_FILES['picturefile']['tmpname'], 'C:\z.jpg')) {
print "Cannot move uploaded file !\n";
} else { print "File moved succesfully"; }
print "Cannot move..."
What could be the problem ? I just have no ideas.
Apache 1.3.12, PHP 4.0.4, Window 2000 Pro. FAT filesystem, which doesn't care about permission and anyway php store session files in that directory ('c:\tmp') without any problem.
Leonid