I want to include a file called script.php
this file is in the includes
folder.
When I do this:
include('/includes/script.php');
There is nothing happend, I get a error message that the file is not found. But when I do this:
include($_SERVER['DOCUMENT_ROOT'] . '/includes/script.php');
It works!, But $_SERVER['DOCUMENT_ROOT']
returns the base path of the document right?
But why is /includes/script.php
not working? When you start a path with /
means you go to the document root right?