I have this test site that has a subfolder called includes; wherein I have my include files.
Now, when I need to include any of these files on other files, if I use include_once $_SERVER['DOCUMENT_ROOT'] ."/includes/file_name.php";, it works fine.
But if I use "/includes/file_name.php" it won't work.
However, if I use "../includes/file_name.php" it works fine.
Now, any suggestions as to why this variance, and which is the best approach and why?
Many thanks for your suggestions and opinions.