Hi Reader's,
Welcome to FindNerd, today we are going to discuss how to get current working directory in php ?
So basically The getcwd() function is used for returning the current working directory.
This function always returns the current working directory on success and return FALSE on failure.
syntax of getcwd() function
getcwd();
you can take refrence of below example:
<?php
//here call getcwd() function and print current directory
echo getcwd()
?>
The output will come following of above example
/var/www/html/test
0 Comment(s)