Hello,
I am trying to tell PHP to check if a directory exists and if it does not, create it with CMOD 0777. I have the following code that does not seem to work:
$username = "cmdr_bond";
$upload_dir = "../images/$username/";
if (!is_dir($upload_dir)) {
if (!mkdir($upload_dir,0777))
die ("upload_files directory doesn't exist and creation failed");
}
Can you show me what's wrong with this?
Thanks