diff options
Diffstat (limited to 'lib/functions.php')
-rw-r--r-- | lib/functions.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/functions.php b/lib/functions.php index e606230..97c93fe 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -304,6 +304,10 @@ function save_file($filename, $extension, $tmp_file, $post_id, $mime='') { 'file_timestamp' => time() ]; + if(!is_dir($files_dir)) { + mkdir($files_dir, 0755); + } + if(!is_dir($files_dir.DS.$insert['file_dir'])) { mkdir($files_dir.DS.$insert['file_dir'], 0755); } |