Problems with php.ini in PHP
I configured the path of include_path in PHP.ini (Unix and Windows my win7 system is configured under Windows), when using include in PHP, the file under the configured path is said to be unable to find, or to use absolute path, Or put it in a folder at the same level.
------Solution--------------------
Include_path indicates that the include command refers to the path to a file, and after setting this value, you can write a relative path in the PHP code to import a file. Under Windows, for example, Include_path is "c:\code\php" and the Include command is written include= "file1.php" so that the true path to the imported file is "c:\code\php\file1.php".
------Solution--------------------
The structure of the catalogue
include/function.php
www/index.php
function.php
function Test () {
Echo ' Hello world ';
}
?>
index.php include function.php
Include ". /include/function.php ";
Test ();
?>