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