In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article focuses on "how to solve the problem of php include is not good", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "how to solve the php include problem"!
Php include is not the solution: 1, use ftp to modify the permissions of the entire directory; 2, modify the code; 3, change the "include (" xxxx ")" to a matching case.
This article operating environment: linux5.9.8 system, PHP7.1 version, DELL G3 computer
What if php include doesn't work?
The failure of linux php file include is an amazing problem.
1. Failed to generate html, permission problem
The day before yesterday, I used php to generate the template, developed on windows, include files, read cache and write files, went well with the wind and water, and uploaded it to linux in the evening to generate html. I found that the files and folders were not generated. Online search said that it was a permission problem, so I used ftp to modify the permissions of the whole directory, right-click the folder, and saw that the menu had a CHMOD item. After selection, as shown in the following figure, all permissions are open.
After that, all the files can be generated, but there is an even weirder problem, which takes more than a day.
2. Include file failed
There is no problem with include on windows. Life or death on linux includes failure, and a bunch of permission issues are found. Finally, the test method is as follows:
1. Create the simplest .php file, only output simple text, even the file name should be simple, even include the output successfully! It can be seen that it is not a question of permissions.
two。 I suspected that there was something wrong with the content of my include file, so I gradually reduced my include file to include failure, and finally narrowed down to only one line of simple output, or failed.
3. Oh, a sudden flash of inspiration, file coding problem! As soon as I checked, sure enough! Quickly modify it to utf-8 code, or include failed, and have been testing local windows during this period, all of which were successful.
4. Why, why test the file include on linux successfully, I want the include file to fail, these two files are simple output, the file encoding is the same, is it …... Is my file cursed? This file name...
5. Finally, finally, is it the case of the file name (crying)? after careful comparison, the case of the file name does not match. Change include ("xxxx") to a matching case, which is a success. But I'm not happy at all.
6. Linux, this, include must pay attention to case, maybe it's just Ali Yun.
At this point, I believe you have a deeper understanding of "how to solve the problem of not php include". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.