PHP.nl

getcwd

getcwd

Gets the current working directory

 **getcwd**

Gets the current working directory.

Returns the current working directory on success, or false on failure.

On some Unix variants, 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 for more information on modes and permissions. getcwd``chmod

Voorbeeld: example

<?php

// current directory
echo getcwd() . "\n";

chdir('cvs');

// current directory
echo getcwd() . "\n";

?>
/home/didou
/home/didou/cvs

Let op: > If the PHP interpreter has been built with ZTS (Zend Thread Safety) enabled, the current working directory returned by may be different from that returned by operating system interfaces. External libraries (invoked through ) which depend on the current working directory will be affected. getcwdFFI

chdir``chmod