chdir

(PHP 4, PHP 5, PHP 7)
chdir — Change directory

Description

Changes PHP’s current directory to directory.

Parameters

  • directory
    The new current directory

Return Values

Returns TRUE on success or FALSE on failure.

Errors/Exceptions

Throws an error of level E_WARNING on failure.

Examples

 

The above example will output something similar to:

 

Share This:

Leave a Reply

Your email address will not be published. Required fields are marked *