Search w3schools.com:

SHARE THIS PAGE

PHP getcwd() Function


PHP Directory Reference Complete PHP Directory Reference

Definition and Usage

The getcwd() function returns the current directory.

This function returns the current directory on success and FALSE on failure.

Syntax

getcwd()


Example

<?php
echo getcwd();
?>

The output of the code above could be:

C:\testweb\main


PHP Directory Reference Complete PHP Directory Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]