Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP getcwd() Function

PHP getcwd() Function

PHP Directory PHP Directory Reference Manual

Example

Get the current working directory:

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 PHP Directory Reference Manual