What to do if php include error occurs
Solution to php include error: 1. Check whether the location of the include file is correct; 2. Check whether the read permission of the included file is open; 3. Check the x of each directory on the included file path Whether the permission is open.
The operating environment of this article: Windows 7 system, PHP version 7.1, DELL G3 computer
Solution to the include file error in the 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. You can use the following methods to solve it Troubleshooting
1. When an error similar to "File not found" occurs, check whether the location of the include file is correct. The following quotes the original words of the PHP manual page:
The following is the quoted content:
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, follow the following methods to eliminate it
a) Check whether the read permission of the included file is open
b) Check whether the included file is open Whether the x permission of each directory on the file path is turned on, this permission determines whether the directory can be browsed.
【Recommended: PHP Video Tutorial】
The above is the detailed content of What to do if php include error occurs. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

In this chapter, we will understand the Environment Variables, General Configuration, Database Configuration and Email Configuration in CakePHP.

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

To work on file upload we are going to use the form helper. Here, is an example for file upload.

In this chapter, we are going to learn the following topics related to routing ?

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

Validator can be created by adding the following two lines in the controller.
