Fri, 17 May 2024


How to change the root directory?

By: Nathalie, NetArt Media
Tue, 16 November 2021

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.


Category: PHP Examples
Share this post:



See All Scripts






Subscribe for our newsletter

Receive the latest blog posts direct in your mailbox