Copyright © tutorialspoint.com
string getcwd ( void ); |
Gets the current working directory.
| Parameter | Description |
|---|---|
| void | NA |
Returns the current working directory on success, or FALSE on failure.
Following is the usage of this function:
<?php
// current directory
echo getcwd() . "\n";
getcwd('html');
// current directory
echo getcwd() . "\n";
?>
|
This will produce following result:
/home/tutorialspoint /home/tutorialspoint/html |
Copyright © tutorialspoint.com