In this tutorial, We will learn how to create a folder if not exist. You can understand the concept of PHP create the directory if not exists.
Example:
<?php
$directoryName = 'images';
/* Check if the directory already exists. */
if(!is_dir($directoryName)){
/* Directory does not exist, so lets create it. */
mkdir($directoryName, 0755);
}
?>
Thanks, I hope it will help you.......