getcwd

Gets the current working directory

Syntax

getcwd(): string|false

Return

Returns the current working directory on success, or false on failure. On some Unix variants, getcwd() will return false if any one of the parent directories does not have the readable or search mode set, even if the current directory does. See chmod() for more information on modes and permissions.

Examples

<?

$return = getcwd();

echo $return;

?>
/home/user

chdir

chroot

closedir

dir

opendir

readdir

rewinddir

scandir

PHP

Home Menu