Inspiration For Creative Minds
Home » Labs » Create Directory in PHP using mkdir  

Filed under Labs

Here is a simple example which creates a directory using mkdir — Makes directory.

mkdir – Example 1

<?php
mkdir("path/to/my/directory", 07777);
?>

mkdir – Example 2

<?php
 if($_POST["createDir"]){ 
 $uploaddir = $_POST["destination"];
 mkdir($uploaddir,0777);
 echo "Directory Created";
 }
 ?>
It's only fair to share...Share on Google+Tweet about this on TwitterShare on Facebook
Labs

Posts you may like: