Why can't txt files be read when phpstudy's integrated environment is used?

Source: Internet
Author: User
I recently used php to read txt files, but I cannot read them all the time. What is the problem? Where does the configuration decide this? I searched a lot and found no problem. I don't know how to solve it? Httpd-conf: I added textplain, and then started apache and stopped immediately. Why?

I recently used php to read txt files, but I cannot read them all the time. What is the problem? Where does the configuration decide this? I searched a lot and found no problem. I don't know how to solve it?
Httpd-conf is as follows:

I added text/plain and started apache and stopped immediately. Why?

Reply content:

I recently used php to read txt files, but I cannot read them all the time. What is the problem? Where does the configuration decide this? I searched a lot and found no problem. I don't know how to solve it?
Httpd-conf is as follows:

I added text/plain and started apache and stopped immediately. Why?

1. First, the webserver software you use is apache httpd or nginx;
2. For httpd, specify DocumentRoot in httpd. conf as your current directory.D:\phpstudy\WWWIn nginx. conf, specify root asD:\phpstudy\WWW;
3. I tried phpstudy and did not find the problem described by the subject.
Update 1:
Check the httpd. conf file.TypesConfig conf/mime.typesWhether there are text/plain lines in. If not, add them.

Follow the "PHP Technology Daquan" Public Account (phpgod), pick up your mobile phone, open it, scan the QR code below easily, and grow a little bit every day, so it's not far from achieving great success.

Another one in the same directory.phpCan the file be opened? If it cannot be openedDomain NameConfiguration Error

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.