PHP getcwd() Function

P
PHP opendir() Function
PHP dir() Function

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();
?>
PHP opendir() Function
PHP dir() Function

Add comment

Tutor Network

Share this

Learn PHP from A to Z