if you want to create folder if not exist. you can understand a concept of php create directory if not exists. I am giving you example of php code to create directory if not exists.
I am explaining you, how to create directory if not exist php. In example, we will use is_dir() and mkdir() to create directory if does not exist. is_dir() will help to check if folder is exit or not and mkdir() will help to create new folder. let’s see example :
<?php
$directory_name = 'images';
/* Check if the directory already exists. */
if(!is_dir($directory_name)){
/* Directory does not exist, so lets create it. */
mkdir($directory_name, 0755);
}
?>
Hello, Welcome to webdeveloperindia.in. I am a full-stack web developer. Email – [email protected] | Skype – azaruddin23. I have knowledge of PHP, Laravel, Magento 1/2, Codeigniter, WordPress, Joomla, Shopify, Git, Bitbuket, jQuery, Ajax, Javascript and ReactJS.