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\WWW
In 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.types
Whether 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.php
Can the file be opened? If it cannot be openedDomain Name
Configuration Error