robkir;11041129 wrote:What is the difference, or advantages between http://site/info/phpFile.php and $_SERVER['DOCUMENT_ROOT'] ."/info/phpFile.php?
One is a URL (which has nothing to do with file paths), and one is a file path (which has nothing to do with URLs).
As for the advantages... well, same thing, really; if the value you need is supposed to be a file path, the latter has the advantage of being the only applicable choice. Similar advantage for the former if what you require is a URL instead.
robkir;11041129 wrote:I've also read a few comments on the internet that seem to say one should avoid relative paths (../info/anotherfile.php). Any thoughts?
My first thought is... if there's absolutely no good use case for them, then why do they exist.
I think it really depends on what your application is doing and/or what kind of assumptions you make about how your codebase will get used.