What should I do if the phpcms directory does not exist?
phpcms upload prompt cannot find the temporary folder/directory (solution)
[phpcms background upload cannot find the temporary folder] This error message It is customized. For example, a certain shop program will prompt this when uploading, while a certain CMS will prompt "You did not choose the file to upload" when uploading. Each PHP system has different opinions, but in fact, it is all used by PHP. The error is caused by the temporary folder not having write permission. At this time, the error code value of $_FILES['XXX']['error'] is 6.
First you need to open the php.ini file and configure the PHP environment under IIS. The php.ini file is usually placed in %system%/windows. Here we open php.ini and search for
;upload_tmp_dir =;upload_tmp_dir =
There is no path behind this, that is, we have not set a temporary folder. The strange thing is that there are many Chinese servers that do not set this item in php.ini. This is normal, but it does not work on the English server.
Then set it yourself
Remove the (;) semicolon in front of the upload_tmp_dir item, and add the path after it, such as setting it to:
upload_tmp_dir ="C:/windows/temp"
to directory C :/windows/temp adds read and write permissions to the website anonymous access user group.
One thing that needs to be noted here is that for the upper-level directory windows, the "list directory" permission of the users user must also be set, otherwise it will be invalid. I was confused about this problem for a long time, and finally the problem was solved!
PHP Chinese website, a large number of free PHPCMS tutorials, welcome to learn online!
The above is the detailed content of What to do if the phpcms directory does not exist. For more information, please follow other related articles on the PHP Chinese website!