abspath php code example Example: absolute path php // File in htdocs MAMP echo getcwd(); //Users/Example/Applications/MAMP/htdocs