SoFunction
Updated on 2025-03-10

Solution to the include file error in PHP script

Solution to the include file error in PHP script

Updated: November 20, 2008 14:01:59 Author:
Often, when the php page uses include, require, require_once to include pages in other locations, an error will occur, such as not finding a second page, or permissions are not allowed, etc. You can exclude it according to the following methods.
1. When an error like "File not found" appears, check whether the include file is located correctly. The following quotes the original words of 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. . if your include_path is libraries, current working directory is /www/, you included include/ and there is include "" in that file, 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 a permission deny similar error occurs, the following method is excluded
a) Check whether the included file read permission is open
b) Detect whether the x permission of each directory on the included file path is open, which determines whether the directory can be browsed.
  • PHP
  • include
  • An error occurred

Related Articles

  • Examples of common methods for operating Redis databases in PHP

    This article mainly introduces the common methods of operating Redis databases by PHP. It summarizes and analyzes the operation techniques related to php for data types such as redis database connections, strings, lists, hash dictionaries, sets, etc. for redis database connections, strings, lists, hash dictionaries, sets, etc. If you need it, please refer to it.
    2018-08-08
  • How to collect web pages using phpQuery

    Use phpQuery to easily collect web content and process page content like jQuery
    2013-11-11
  • php operand array (merge, split, append, search, delete, etc.)

    This article mainly introduces some of the functions of operating arrays that come with PHP. It is specially organized and convenient for everyone to use
    2012-07-07
  • 10 little-known functions in PHP

    This article mainly introduces 10 less-known but very useful functions in PHP. Friends who need it can refer to it.
    2014-02-02
  • Summary of Url production problems in yii framework

    A summary of the Url production problem in the yii framework, friends who need it can refer to it.
    2012-01-01
  • PHP file to get WeChat jssdk configuration

    This article mainly introduces in detail how php uses a file to solve the WeChat jssdk configuration, which has certain reference value. Interested friends can refer to it.
    2016-12-12
  • Just now, I was simplifying the php library, but I found a lot of things

    I just simplified the php library, but I found a lot of things...
    2006-12-12
  • Analysis of skills to improve the efficiency of element search and element deduplication in PHP array

    This article mainly introduces the analysis of skills in PHP arrays to improve the efficiency of element search and element deduplication. The article compares the execution speed of related methods to summarize the methods in the array to make element search and deduplication more efficient. Friends who need it can refer to it
    2016-03-03
  • Coreseek Search English questions for detailed explanation

    This article provides a detailed analysis and introduction to the problems of coreseek search English. If you need it, please refer to it.
    2013-06-06
  • A summary of new features of PHP 7.1

    Everyone knows that the release of PHP 7.1 is about to be released, so this article will organize some new features in 7.1 for you to understand. All content is selected from the official RFC documentation. Friends in need can refer to it. Let’s learn from it with the editor below.
    2016-12-12

Latest Comments