getcwd
is a PHP function that returns the current directory in which the program is being run.
getcwd(): string|false
The function does not take any parameters.
If successful, the function returns the current working directory. Otherwise, it returns false
.
<?php// prints the current directoryecho getcwd() . "\n";?>
/home/educative