hey guys, wondering what i'm doing wrong. first time i'm using this function. i'm inside of PATH and i want to create a folder inside of PATH. i wann check if the folder already exists, if not create one. getting the name of the folder from an inputfield with name of "dirname".
if (isset($_POST['createDir'])) {
//get value of inputfield
$dir = $_POST['dirname'];
//set the target path ??
$targetfilename = PATH . '/' . $dir;
if (!file_exists($dir)) {
mkdir($dir); //create the directory
chmod($targetfilename, 0777); //make it writable
}
}
thank guys