Asbjorn Grandt - 2011-03-19 12:21:05 -
In reply to message 1 from rudie dirkx
Yup, I do realize that there is a native function called realpath. However realpath have one major drawback, it requires the path to be resolved to exist on the local system. In addition, it'll also follow symbolic links on systems having those, meaning that ../../some link/somewhere may end up being /var/www/somewhere.
Both issues makes realpath rather useless if you are going to resolve paths into html links that probably does not exist on your system, or if they do, need to be relative. realpath will always return the absolute/canonical path.