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