Jump to: navigation, search

Php getcwd

From w3cyberlearnings

Contents

PHP function getcwd

This function gets the current working directory.

Syntax getcwd

getcwd();

Note

Returns the current directory on success and FALSE on failure.

Example 1:Linux

<?php 
   echo getcwd();
?>

Output

/home/w3cyberlearnings/testphp

Example 2: Microsoft Windows

<?php 
  echo getcwd();
?>

Output

c:\test\phptest

--chdir-- chroot-- closedir-- dir-- getcwd-- opendir-- readdir-- rewinddir-- scandir--

Navigation
Web
SQL
MISC
References