Faced such a problem: you must upload the file to the server. I did everything according to the instructions on the Internet: the form in html with enctype, method is all right here, because when checking the $ _FILES array it gives the correct information about the file. However, the point is this: as I understood from the Internet, the copy () function cannot be applied to temporary files; used move_uploaded_file (), as it should, however, this function does not copy the file to the directory I need (C: \ intetpub \ <here is my website folder>), unless this directory is "C: \ Windows \ Temp \", where I’m from and transfer the file. I checked the access rights on these two folders, they are identical. What to do? Temp folder do not want to clog. I would be grateful for any help.

PS Before that, I already experimented with the php config. It all ended with a complete demolition and reinstallation of the OS on the server. Perhaps the question is wildly Nubian, but this time I do not want to risk it.

  • When checked, the function simply returns false. The parameter 'Error' in FILES is 0. - Puro

1 answer 1

Yes, this is a known issue for Windows OS and IIS servers. The solution is the following - it is necessary to change the setting in php.ini for upload_tmp_dir . You have there installed the default C:\WINDOWS\Temp . Change this value to your directory. Read more in this comment .

  • I had to figure it out, but in the end everything turned out. Thank you very much. - Puro