Say I have a symlink from \'/one/directory/\' to \'/two/directory/\'.
\'/one/directory/\'
\'/two/directory/\'
If I echo dirname(dirname(\\__FILE__)), it returns
echo dirname(dirname(\\__FILE__))
Maybe with realpath() ? http://php.net/manual/en/function.realpath.php
Edit : readlink seems to be a better answer :)