I often need to use a relative path to refer to other files (for example in includes or requires). This is on a windows 2003 server and PHP 4.3.7.
I can do this if the target is lower down the hierarchy (subdirectory/file.php), but when the file is higher up or in a different leg it doesn't work.
I've tried using "./" and "../" to go up but to no avail.
Example:
Directory1 and Directory2 are both directories in the root of a site.
I have a file in Directory1 which needs to inlcude a file in Directory2, so I call:
<? include("../Directory2/targetfile.php"); ?>
but it doesn't work.
Am I doing something wrong?
Really grateful for some help here. TIA. 🙂
3v
PS. I know I can use absolute paths, but there are reasons why I cannot use URLs or full machine paths.