Starting your paths with /
means look in the root directory, so /../
is technically one directory above the root directory.
To set the include path to the parent directory of the current location, you just need ../
. To make the code more portable I would suggest combining it with dirname(__FILE__)
to get the absolute path of the current directory.
IE:
set_include_path(dirname(__FILE__) . '/../my/');
Note the preceding /
is required in that example as dirname()
does not return a trailing slash