The PHP function "getcwd()" is used to get the current working directory. It returns a string containing the path of the current working directory.
Example:
$dir = getcwd();
echo "Current directory is: " . $dir;
Result:
Current directory is: /home/user/myproject
This function is a part of the PHP Core Library.
PHP File::pwd - 30 examples found. These are the top rated real world PHP examples of File::pwd from package someline-starter extracted from open source projects. You can rate examples to help us improve the quality of examples.