September 2001
Intermediate to advanced
768 pages
32h 45m
English
string getcwd(void)
Returns the current working directory of the current PHP instance.
Returns:
Absolute pathname of the current working directory on success; FALSE for all other cases
Description:
getcwd() returns the current working directory of the current instance of PHP. PHP uses the current working directory as the starting point for any path search in which the pathname is not absolute. This means that most function calls that relate to the filesystem will use the current working directory as the directory in which they operate, unless the pathname specified in the function call is absolute.
Version:
From version 4.0
See also:
To set the current working directory:
chdir()
Example:
<?php ... |
Read now
Unlock full access