Change the root directory in PHP

Description

The following code shows how to change the root directory.

Example


/*from   w w w . ja  v a2s  .co m*/
<?php
   // Change root directory
    chroot("c:/");

   // Get current directory
    echo getcwd();
?>




















Home »
  PHP Tutorial »
    File »




Directory
DirectoryIterator
Drive
File
File Permission
File Read Save
FileSystemIterator
Path
Zip