File Exists Function

$uploads = wp_upload_dir();
$wp_upload_directory = $uploads['basedir'];
//Check if quantum uploads exists and create
if (file_exists($wp_upload_directory . "/myNewDirectory")){
//Do Nothing
}
else {
mkdir($wp_upload_directory . "/myNewDirectory", 0777);
}

0 Comments

You must be logged in to post a comment.