PHP files cannot be uploaded in the IIS environment _ PHP Tutorial

Source: Internet
Author: User
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 ,...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.