The chdir() function changes the current directory to the specified directory.
This function returns TRUE on success and FALSE on failure.
<?php
chdir("images");
echo "<br />";
echo getcwd();
?>
This function returns TRUE on success and FALSE on failure.
Syntax
chdir(directory)<?php
chdir("images");
echo "<br />";
echo getcwd();
?>