I have a file index.php in root directory:
<?php
require_once "./include/common.php";
?>
and file common.php in include folder:
<?php
require_once "globalConfig.php";
?>
file globalConfig in the same folder with common.php. The tree folder as:
xxx/index.php
xxx/include/common.php
xxx/include/globalConfig.php
index.php run normally. But if I change file common.php as:
<?php
require_once "./globalConfig.php";
?>
PHP show a warning that it cannot find the globalConfig.php file. What is the difference? I think int the case with "./", the most outside including file (index.php) will find the globalConfig.php in its current directory.