1 absolute, relative, and indeterminate paths
Relative path
A relative path refers to a path that begins with a.
./a/a.php (relative to current directory)
.. /common.inc.php (relative superior directory),
Absolute path
Absolute path is
Summarize:1. Include or require contains other files used./or. /, the current path and the previous layer path, depending on the path of the script being run, will have the following problem.When you write PHP programs, you often use include or
Summary of require and include path issues in PHP, Requireinclude
1 absolute path, relative path, and indeterminate path
Relative path
A relative path refers to a path that begins with a.
./a/a.php (相对当前目录) ../common.inc.php (相对上级目录),
Absolute
Require and include path issues in PHP, Requireinclude
1 absolute path, relative path, and indeterminate path
Relative path
A relative path refers to a path that begins with a.
Copy the Code code as follows:./a/a.php (relative to current directory).
Introduction:
The inclusion path in Perl and PHP has always been a difficult problem, mainly related to the operating system and Web servers, and it is impossible to be very intelligent to solve this path problem. The path to perl,php is much
For details about the require and include paths in PHP, requireinclude. For details about the require and include paths in PHP, the absolute path, relative path, and relative path of the undetermined paths refer. for example, detailed descriptions
1 absolute path, relative path, and indeterminate path relative pathA relative path refers to a path that begins with a../a/a.php (相对当前目录) ../common.inc.php (相对上级目录),Absolute pathThe absolute path is either the/start or the c:/under Windows
This article mainly introduces the detailed explanation of the require and include paths in PHP. For more information, see
This article mainly introduces the detailed explanation of the require and include paths in PHP. For more information, see
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.