In this article, you will learn how to get the current working directory in PHP. The getcwd() function in PHP returns the current working directory.
what is the syntax of the GETCWD() function in php?
getcwd()
examples of the GETCWD() function
Example 1. In this example, we get the current working directory.
<?php
echo getcwd();
?>