Recently encountered such trouble, unable to find the temporary folder returned by the error code is 6. This article mainly and everyone introduced the PHP upload can not find temporary folder solution, the main processing method is to find PHP configuration file php.ini and make the corresponding changes, the specific solution for everyone reference under this article, I hope to help everyone.
Cause of Error:
One, the configuration file does not have a temporary folder set
Second, the temporary folder does not have or the parent folder does not have the appropriate permissions
Processing method:
Locate the PHP configuration file php.ini, and locate the following code
;upload_tmp_dir =
Switch
Upload_tmp_dir = "C:/windows/temp" //The following folder path is set according to your system
If the permissions are insufficient, you can add the appropriate permissions to the files according to the operating system.
Other knowledge:
$_FILES['file']['error']
The value is 0, no error occurred and the file upload was successful.
The value is 1 and the uploaded file exceeds the upload_max_filesize option limit in php.ini.
Its value is 2, and the size of the uploaded file exceeds the value specified by the MAX_FILE_SIZE option in the HTML form.
The value is 3, and the file is only partially uploaded.
Its value is 4 and no files are uploaded.
The value is 6 and the Temp folder cannot be found. PHP4.3.10 and PHP5.0.3 introduced.
The value is 7, and the file write fails. PHP5.1.0 introduced.
If the newspaper is wrong, it should be temporary folder does not have write permission or does not exist
Related recommendations:
php-ask for PHP System Temp folder problem