How to solve the problem of error when importing php files

藏色散人
Release: 2023-03-05 06:04:02
Original
2924 people have browsed it

Introduce the solution to PHP file error: first check whether the read permission of the included file is open; then check whether the x permission of each directory on the included file path is open, and then open the permission.

How to solve the problem of error when importing php files

Recommendation: "PHP Video Tutorial"

Solution to include file error in php script

Often when the php page uses include, require, require_once to include some pages in other locations, errors will occur, such as the page is not found, or permissions are not allowed, etc., which can be eliminated according to the following methods

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/1z0-147 .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.
Copy after login

2. When an error similar to permission deny occurs When in the following methods, exclude

# A) Detect whether the file read permissions contained in

B) Detect whether the X permissions of each directory on the file path are opened Permissions determine whether the directory can be browsed.

The above is the detailed content of How to solve the problem of error when importing php files. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!