1
0
Fork 0
template/functions/create-folder.php
2024-04-25 21:55:08 +02:00

16 lines
No EOL
310 B
PHP
Executable file

<?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);
}
}
}
?>