login

Getting the Current Working Directory

To get the current working directory you use the function getcwd() as follows:

<?php
 $cwd = getcwd();
 echo "The current working directory is: $cwd";
?>