Anyone know if there is a “best” or industry standard for pointing/ calling a file? Lets say that there are folders and subfolders involved also. I’ve found some different ways to go around doing it. Just looking for some pointers ~.^ and opinions.
Windows vs Linux (even though I’m using Linux, just for others that come across this post)
(dirname(__FILE__))
BASE_PATH
$_SERVER["HTTP_HOST"]
$_SERVER['DOCUMENT_ROOT']
I personally use this:
That way it is always correct regardless of
$_SERVER, OS, or include paths.