PHP chdir() Function

The chdir() function changes the current directory.

Example -

/home/vincent
/home/vincent/public_html

Note:

When safe mode is enabled, PHP checks whether the directory in which the script is operating has the same UID (owner) as the script that is being executed.