|
Posted by BKDotCom on 11/21/07 22:56
I have a problem I can't crack.
I have the following example directory structure
/some_arbitrary_path/htdocs/ ( also $_SERVER['DOCUMENT_ROOT'] )
/some_arbitrary_path/htdocs/common is a symbolic link to
/some_different_path/common/
if $_SERVER['DOCUMENT_ROOT'].'/common/some_script.php' gets
included...
it works just fine, however, within some_script.php
__FILE__ == /some_different_path/common/some_script.php
So:
How do I determine that __FILE__ does in fact fall inside the
DOCUMENT_ROOT tree?
and/or, get a the value of the path that I included (one with /
arbitrary_path)
and/or, determine the "html path" to some_script.php is '/common/
some_script.php'?
Navigation:
[Reply to this message]
|