Hi,
I'm using move_uploaded_file to upload files to my web server. At the same time, I create a dat file with information about the upload, using the uploaded file's name. My problem is that when I run the script, the file itself doesn't appear on my webserver, but the dat file that I'm creating comes out just fine. If I run the script again with the same file however, it uploads properly. Here is the code I'm using for the upload:
move_uploaded_file($_FILES['userfile']['tmp_name'], "./{$_FILES['userfile']['name']}");
echo "The file was uploaded successfully.<br><br>";
echo 'Filename: ', $_FILES['userfile']['name'], '<br>Size: ', $_FILES['userfile']['size'], ' bytes.';
There is also some info about the upload passed in a form to the next page which is used to create the dat file. The confirmation page appears correctly with the file name and size, and the page takes quite a while to load, indicating that the upload is occurring.
Any idea what might cause this problem? Thanks for any help.