I have root directory in my Apache Server named “www”.
“www” has a directory named “x-test”.
“www” has a file named “13-1.php” (temperal link http://dot.kr/13-1.php ) .
“x-test” has a file named “13.php” (temperal link http://dot.kr/x-test/13.php ).
13.php has the code below.
<?php
include "[COLOR="red"]../[/COLOR]13-1.php"
?>
With the code above 13.php seems successfully displaying the contents of 13-1.php because 13.php includes 13-1.php .
The code above wrote with a relative path from the location of 13.php
I like to write it with a absolute path from the root, i.e. “www”.
So I made the 14.php (temperal link http://dot.kr/x-test/14.php ) in the “x-test” directory with the code below.
<?php
include "[COLOR="Red"]/[/COLOR]13-1.php"
?>
But 14.php seems not to work fine.
Absolute path(/) which start from the root “www” doesn’t work in PHP?