1
0
Fork 0
template/functions/create-folder.php

16 lines
310 B
PHP
Raw Permalink Normal View History

2024-04-25 21:55:08 +02:00
<?php
function create_folder($string) {
if(!file_exists($string)) {
if(!is_writeable($string)) {
die(simplepage('Was not able to create folder outside root: permission denied.', false, true));
} else {
$oldmask = umask(0);
mkdir($string, 0777, true);
umask($oldmask);
}
}
}
?>