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); } Quote 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 Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/86367-solved-folder-check/#findComment-441427 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.