Example
Get the current working directory:
html
<?php
echo getcwd();
?>
Result:
html
/home/php
Definition and Usage
The getcwd() function returns the current working directory.
Syntax
text
getcwd()
Technical Details
| Return Value: | The current working directory on success, FALSE on failure. |
|---|---|
| PHP Version: | 4.0+ |