What is the reason why txt files cannot be read when using Phpstudy's integrated environment?

Source: Internet
Author: User
Keywords Php

Recently in the use of PHP read TXT file, always can not read, what is the problem? Where is the configuration decided this ah? Search a lot, did not find the problem, do not know how to solve?
Httpd-conf as follows:

I added Text/plain, and then Apache started to stop itself immediately, why?

Reply content:

Recently in the use of PHP read TXT file, always can not read, what is the problem? Where is the configuration decided this ah? Search a lot, did not find the problem, do not know how to solve?
Httpd-conf as follows:

I added Text/plain, and then Apache started to stop itself immediately, why?

1. First, you use the Webserver software is Apache httpd or nginx;
2. Second, if it is httpd then please specify the DocumentRoot in the configuration item in httpd.conf as your current directory D:\phpstudy\WWW , if it is nginx, specify root in the nginx.conf in your current directory D:\phpstudy\WWW ;
3. In addition, I tried a bit phpstudy did not find the problem described by the main topic.
Update 1:
Ask the main question to check if TypesConfig conf/mime.types there is a text/plain text line in the httpd.conf, and if not, add it.

Focus on "PHP technology Daquan" public number (Phpgod), pick up the phone, open, easy to sweep the following QR code, grow a little every day, the achievement of the great God is not far.

Can another file in the same directory .php open? If it doesn't open, that's the 域名 problem with the configuration.

  • Related Article

    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.