X
HOME HTML5 CSS3 JAVASCRIPT SQL PHP5 JQUERY ANGULAR BOOTSTRAP3 XML MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

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

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook