PHP getcwd() Function
Syntax
getcwd();
Definition
It returns the working directory of the file in the form of string otherwise return false.
Usage
getcwd() function is used to find the path of the current script.
Example of getcwd function
<?php var_dump( getcwd() ); echo getcwd(); ?>
- Example
- Run