Home  >  Article  >  Backend Development  >  Solution to include file error in PHP script_PHP tutorial

Solution to include file error in PHP script_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:48:21956browse

1. When an error similar to "File not found" occurs, check whether the location of the include file is correct. The following is the original quote from the PHP manual page:
Files for including are first looked in include_path relative to the current working directory and then in the directory of the current script. E.g. if your include_path is libraries, current working directory is /www/, you included include/a.php and there is include "b.php" in that file, b.php is first looked in / www/libraries/ and then in /www/include/. If filename begins with ./ or ../, it is looked only in include_path relative to the current working directory.
2. When an error similar to permission deny occurs , exclude according to the following methods
a) Check whether the read permission of the included file is turned on
b) Check whether the x permission of each directory on the included file path is turned on. This permission determines whether the directory can be browsed. .

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/319762.htmlTechArticle1. When an error similar to "File not found" appears, check whether the location of the include file is correct. PHP is quoted below Original words from the manual page: Files for including are first looked in incl...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn