16 lines
310 B
PHP
16 lines
310 B
PHP
|
<?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);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
?>
|