日期:2014-05-17 浏览次数:20562 次
require (dirname(__FILE__) . "/../conn.php");
mysql_select_db("news",$conn_database);
mysql_query("delete from web_news where news_date<(date(now())-60*60*24*30)");
mysql_close($conn_database);
if ($handle = opendir(dirname(__FILE__).'/../cache/')) {
while (false !== ($file = readdir($handle))) {
if ((time()-filectime(dirname(__FILE__).'/../cache/'.$file)) < 60*60*24*30) {
if (strripos($file, '.html') !== false) {
unlink(dirname(__FILE__).'/../cache/'.$file);
}
}
}
}