mcmuney Posted January 16, 2008 Share Posted January 16, 2008 How would I modify the if statement below to check to see if the date folder exists in a specific directory and create it if it doesn't exist? $date = date("m-d-y"); //$sql = mysql_query("SELECT * FROM images WHERE date = '$date'"); //$row = mysql_fetch_row($sql); if ($row == NULL) { mkdir("photos/$date", 0777); } Link to comment https://forums.phpfreaks.com/topic/86367-solved-folder-check/ Share on other sites More sharing options...
revraz Posted January 16, 2008 Share Posted January 16, 2008 Maybe is_dir http://us2.php.net/is_dir Link to comment https://forums.phpfreaks.com/topic/86367-solved-folder-check/#findComment-441333 Share on other sites More sharing options...
mcmuney Posted January 16, 2008 Author Share Posted January 16, 2008 Thanks. Link to comment https://forums.phpfreaks.com/topic/86367-solved-folder-check/#findComment-441427 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.