THE WORLD'S LARGEST WEB DEVELOPER SITE

PHP getcwd() Function

PHP Directory PHP Directory Reference

Example

Get the current working directory:

<?php
echo getcwd()
?>

Result:

/home/php


Definition and Usage

The getcwd() function returns the current working directory.


Syntax

getcwd();

Technical Details

Return Value: Returns the current working directory on success. FALSE on failure.
PHP Version: 4.0+

PHP Directory PHP Directory Reference

COLOR PICKER

colorpicker

SHARE THIS PAGE






Search w3schools.com:

Translate w3schools.com: