Absoluter Pfad PHP
// File in htdocs MAMP
echo getcwd(); //Users/Example/Applications/MAMP/htdocs
JérômeW
// File in htdocs MAMP
echo getcwd(); //Users/Example/Applications/MAMP/htdocs
SplFileInfo.
$path = new SplFileInfo(__FILE__);
echo 'The real path is '.$path->getRealPath();