PHP getcwd() Function

The getcwd() function returns the current working directory.Returns 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,

Example -

Result -

The above example will output something similar to: