relative path confusion
Posted: Wed May 05, 2010 12:24 pm
I'm wondering if I'm not understanding relative path correctly.
I've got a php file in http://www.site/ws (that is, /ws/file.php). I want to include a file at http://www.site/otherdirectory/toBeIncluded.php. I would think that this would work:
include("../otherdirectory/toBeIncluded.php");
But for some reason it chokes on that. If I enter the absolute path (http://www.site/otherdirectory/toBeIncluded.php) it works and if I create a shortcut in /ws it works.
Is there some reason I'm missing that include("../otherdirectory/toBeIncluded") doesn't work?
Thanks
I've got a php file in http://www.site/ws (that is, /ws/file.php). I want to include a file at http://www.site/otherdirectory/toBeIncluded.php. I would think that this would work:
include("../otherdirectory/toBeIncluded.php");
But for some reason it chokes on that. If I enter the absolute path (http://www.site/otherdirectory/toBeIncluded.php) it works and if I create a shortcut in /ws it works.
Is there some reason I'm missing that include("../otherdirectory/toBeIncluded") doesn't work?
Thanks