Answers for "php mkdir get file exists but not exists"

PHP
0

php mkdir if not exists

<?php
if (!file_exists('path/to/directory')) {
  	/**
     * 0755 - Permission
     * true - recursive?
     */
    mkdir('path/to/directory', 0755, true);
}
Posted by: Guest on February-13-2021

Browse Popular Code Answers by Language