There is a special function for this in PHP called chroot. The syntax of this function is as follows: int chroot (string strNewDirectory) Be aware that if the directory change was not successful chroot will return false.
<< Go back