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
<?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);
?>
Comments
No comments have been made yet.
Please login to leave a comment. Login now