PHP script include file error Solution

Source: Internet
Author: User
When include, require, and require_once are used in php pages to contain pages in other locations, errors may occur, such as page not found or permission not allowed, you can use the following methods to exclude 1. when an error similar to "file not found" occurs, check whether the location of the include file is correct.

When include, require, and require_once are used in php pages to contain pages in other locations, errors may occur, such as page not found or permission not allowed, you can use the following methods to exclude 1. when an error similar to "file not found" occurs, check whether the location of the include file is correct.

When include, require, and require_once are used in php pages to contain pages in other locations, errors may occur, such as page not found or permission not allowed, you can use the following methods to exclude

1. When an error similar to "file not found" occurs, check whether the location of the include file is correct. The following is the reference on the php manual page:

Files for including are first looked in your de_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 have ded include/. 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. /or/, it is looked only in your de_path relative to the current working directory.

2. When an error similar to permission deny occurs, follow these steps:

A) checks whether the read permission of the included files is enabled.

B) Check whether the x permission of each directory on the included file path is enabled. This permission determines whether the directory can be browsed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.