1

I follow the php.net of File upload(http://www.php.net/manual/en/features.file-upload.post-method.php) to implement file upload. It seems OK but I can't found the temp file.

Below is the $_FILES debug info

array(1) { ["userfile"]=> array(5) 
{ ["name"]=> string(14) "driver_win.csv" 
["type"]=> string(8) "text/csv" 
["tmp_name"]=> string(25) "/tmp/php_upload/phpzdeKnp" 
["error"]=> int(0) 
["size"]=> int(29952) } }

You can see the error is 0 and I've chmod 777 to "/tmp/php_upload" directory.
I confirm that this directory is writeable.
PHP is_writable() and file_put_contents() show that this directory is writeable.

And it's not the size limit problem. The size is just 30K. My php.ini config is 2M and apache post 8M.

But I can't found any temp file.

1 Answer 1

4

The file will be deleted when the script finishes. You need to process it (e.g. copy it somewhere) inside the PHP script if you want to preserve it.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.