Gen. partnerAlgotech

PHP function getcwd()

Gets the current working directory

|
September 11, 2019

Availability in PHP 4.0

Gets the current working directory

Parameters

The function has no input parameters.

Return values

string

the current working directory on success, or false on failure.

On some Unix variants, getcwd will return false if any one of the parent directories does not have the readable or search mode set, even if the current directory does. See chmod for more information on modes and permissions.

Additional resources

Official getcwd documentation

Loading comments...

Stay in the loop

Subscribe to our newsletter and get the latest cybersecurity news delivered straight to your inbox.

Your data is safe. You can unsubscribe from the newsletter at any time.