Changes the current working directory.
TRUE is returned on success. If an error occurs, FALSE is returned.
<?php
if (chdir("upload")) {
print "Changed current directory successfully";
}
?> Changed current directory successfully This code changes the working directory to the upload directory in the previous working directory.