Change the root directory:
Result:
The chroot() function changes the root directory of the current process to directory, and changes the current working directory to "/".
Note: This function requires root privileges, and is only available to GNU and BSD systems, and only when using the CLI, CGI or Embed SAPI. This function is not implemented on Windows platforms.
Parameter | Description |
---|---|
directory | Required. Specifies the path to change the root directory to |
Return Value: | TRUE on success. FALSE on failure. |
---|---|
PHP Version: | 4.0.5+ |