Php files cannot be uploaded in the IIS environment. I was the first to contact PHP. I learned the online example and wrote a file upload function. I found that the file could not be uploaded normally. The code is certainly no problem, because Google and Baidu once again on the Internet, I was the first to contact PHP, learn online examples to write a file upload function, found that the normal Upload fails. The code is certainly no problem, because on the internet Google, Baidu once, the code for uploading files is the same.
Problem Description: After the upload, the value of $ _ FILES ['tmp _ name'] is null.
After some searching, I personally think that because I use IIS instead of Apache as a Web server, PHP is used by default. the upload_tmp_dir parameter of ini is not set. the default temporary folder for uploading may not exist (I don't know which folder can tell me clearly, I guess c: // windwos/temp) or the permission is insufficient. As a result, I created a new folder as a temporary folder, set full permissions for everyone (haha, local testing is not so well-tuned), and set upload_tmp_dir to this folder in PHP. ini. After IIS is restarted, the problem persists.
Later, I thought, maybe I had a problem configuring IIS + PHP by myself, so I downloaded the integrated IIS + mysql + php tool from the Internet. after installation, the problem was solved.
Conclusion: the configuration is still incorrect. Where can I continue?
Bytes. The code must be okay, because Google and Baidu are all over the Internet ,...