php getcwd() resolving target of symlink instead of current directory php getcwd() resolving target of symlink instead of current directory php php

php getcwd() resolving target of symlink instead of current directory


OK figured it out. Use $_SERVER['SCRIPT_FILENAME'] if over the browser. Over the command line, you can get the current symlinked directory using exec("pwd")