mkdir if not exists php code example
Example: php mkdir if not exists
<?php
if (!file_exists('path/to/directory')) {
/**
* 0755 - Permission
* true - recursive?
*/
mkdir('path/to/directory', 0755, true);
}
<?php
if (!file_exists('path/to/directory')) {
/**
* 0755 - Permission
* true - recursive?
*/
mkdir('path/to/directory', 0755, true);
}