getcwd

(PHP 4 , PHP 5)

getcwd -- Gets the current working directory

Popis

string getcwd ( void )

Returns the current working directory, or FALSE on failure.

Poznámka: 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.

Príklad 1. getcwd() example

<?php

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

chdir('cvs');

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

?>

V�stup pr�kladu uveden�ho vy�ie bude nie�o podobn� tomuto:

/home/didou
/home/didou/cvs

See also chdir() and chmod().