Shell commands are another group of functions that carry high importance and frequency in programming with PHP. The example below is showing how to create a folder and change it's security mode.

Simple example of making a folder with PHP

    $dir = "directory_new"; // new folder's name
    $path = "/path/"; // new folder's path
    // create a folder
    mkdir($path . $dir, 0775, true); // creating folder with mode
    // change mode
    chmod($path, 0777);


›› go to examples ››