How can we include php files without specifying the subfolder path
How can we include php files without specifying the subfolder path Normally we use the following code to include php files inside each other: <?php include_once 'include/config.php'; // OR include 'include/config.php'; // OR include_once $_SERVER['DOCUMENT_ROOT'].'include/config.php'; // ect... ?> But the above codes only apply if the php files are in the root file. I mean, if we move our files into a subfolder. We need to make a change to the code we included in the php files. For example like this: <?php include_once 'subfolder/include/config.php'; // OR include 'subfolder/include/config.php'; // OR include_once $_SERVER['DOCUMENT_ROOT'].'/subfolder/include/config.php'; // ect... ?> What I'm saying is that when we move our php files into the subfolder, then include_once want to see subfolder name like ( include_once 'subfolder/include/config.php'; ). This is a challenging s...