PHP getcwd() Function
Example
Get Current Working Directory:
<?php echo getcwd() ?>
Result:
/home/php
Definition and Usage
The getchwd() function returns the current working directory.
Syntax
getcwd();
Technical Details
Return Value: | Returns the current working directory if successful. Returns FALSE if fails. |
---|---|
PHP Version: | 4.0+ |