This is a newbie question I guess. I've got a script that should let users upload files, but nothing seems to happen.
The form looks like this:
After that I print $_FILES['sUploadFile']['tmp_name'] which is something like /var/tmp/phpNsBgs0. However, in /var/tmp/ there are no files called like that..?!?
file_uploads is on in my php.ini. The max size is 2Mb.
Also, I tried setting upload_tmp_dir to another folder in my php.ini.
This results in the $_FILES['sUploadFile']['tmp_name'] still being /var/tmp/phpNsBgs0, while move_uploaded_file() starts to complain that it can't find a file in my newly set upload_tmp_dir.
I'm quit at loss..?!?
The form looks like this:
Code:
<form enctype="multipart/form-data" action="./myPage.php"
method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="10000000">
Upload a new file: <input name="sUploadFile" type=file><br>
<input type="submit" value="Upload File">
</form>
file_uploads is on in my php.ini. The max size is 2Mb.
Also, I tried setting upload_tmp_dir to another folder in my php.ini.
This results in the $_FILES['sUploadFile']['tmp_name'] still being /var/tmp/phpNsBgs0, while move_uploaded_file() starts to complain that it can't find a file in my newly set upload_tmp_dir.
I'm quit at loss..?!?