2levelsabove Posted July 6, 2009 Share Posted July 6, 2009 No matter what I do but the directory does not get created. If I just use MKDir by itself it comes back with saying that file already exists warning. I have checked again and again and the file is not there. Please suggest. I believe I have all the necessary permissions. $outputfilepath = "user_storage/".$atruserid."/flyers/".$adID."/test/"; if (!is_dir($outputfilepath)) { mkdir($outputfilepath, 0777, 1); chmod($outputfilepath,0777); $output="DIRECTORY CREATED"; } else{ $output="'$outputfilepath' NOT CREATED AS IT ALREADY EXISTS"; } Link to comment https://forums.phpfreaks.com/topic/165004-mkdir-warning-file-exists/ Share on other sites More sharing options...
p2grace Posted July 6, 2009 Share Posted July 6, 2009 Try using file_exists() to check if the folder exists instead of is_dir(); Link to comment https://forums.phpfreaks.com/topic/165004-mkdir-warning-file-exists/#findComment-870062 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.