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. 


$directoryName = 'images';
/* Check if the directory already exists. */
    /* Directory does not exist, so lets create it. */
    mkdir($directoryName, 0755);

Thanks, I hope it will help you.......