PHP getcwd()Functions
PHP Directory Reference Manual
Examples
Get current working directory:
<?php
echo getcwd()
?>
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 on success, or FALSE on failure. |
|---|---|
| PHP version: | 4.0+ |
PHP Directory Reference Manual Other extensions