error_reporting(E_ALL || ~E_NOTICE);
header("Content-Type: text/html; charset=utf-8");
$cfg_NotPrintHead = false;
include_once (dirname(__FILE__)."/include/common.inc.php");
$data1 = $_GET['date']. '00:00:00'?$_GET['date']. '00:00:00':date('Y-m-d'). '00:00:00';
$data2 = $_GET['date']. '23:59:59'?$_GET['date']. '23:59:59':date('Y-m-d'). '23:59:59';
$d1= strtotime($data1);
$d2 = strtotime($data2);
$reval = array();
$dsql->SetQuery("SELECT id,title FROM `dede_archives` where `arcrank`>=0 AND pubdate>={$d1} AND pubdate<={$d2} ORDER BY id DESC LIMIT 0,2000");
$dsql->Execute('me');
$i=-1;
while ($row = $dsql->GetArray('me')) {
unset($url,$arc_array);
$i++;
if($i%10) continue;
$arc_array=GetOneArchive($row['id']);
$url = $arc_array['typedir'] . '/' . date('Y_md') . '/' . $row['id'] . '.html';
echo $row['url'] = 'http://www.jingyang.org'.$url.'<br>';
}
在网站根目录新建一个url.php文件,然后把上面的代码粘贴进去,替换网站域名即可!
调用方法:
date = 你需要调用的日期