I have recently discovered set_include_path() and have found that the path that is returned is the path to my includes directory.
Does PHP automatically look for an includes directory and update the include_path to this?
I have also noticed that the few paths that I set with set_include_path are not available inside a Class Method when set outside of the Class itself.
Why is this?
$include_root = $_SERVER['DOCUMENT_ROOT'] . '/path/to/includes/';
$include_paths = get_include_path() . PATH_SEPARATOR .
$include_root . PATH_SEPARATOR .
$include_root . 'classes/' . PATH_SEPARATOR;
set_include_path( $include_paths );
Thanks for all your advice in advance!