} $start = ($page - 1) * $gPageSize; $end = $page * $gPageSize; mysql_connect("localhost", "root", "chy123456"); mysql_select_db("blogdata"); $sql = "select id, url, title, description, updatetime,hits,fullcontent from sina_documents where id in({$ids}) order by field(id,{$ids}) limit {$start},{$end}"; ##";hits desc mysql_query("set names utf8"); $rst = mysql_query($sql); $opts = array("before_match" => "<font style='color:#f00;'>", "after_match" => "</font>"); //#$row_num=mysql_num_rows($rst);### $MaxPage = (int) ceil($row_num / $gPageSize); if ((int) $page > $MaxPage) { $page = $MaxPage; } $format_number1 = number_format($Timer1->show(false), 3, '.', ''); echo "<p style='margin-left:10px;'>共搜索到<b style='color:red;'>{$row_num}</b>条记录,耗时 {$result['time']} / {$format_number1} s。<br></p>"; if ($rst) { $pg = 0; //循环显示当前纪录集 $i = $start; for ($pg; $pg < $gPageSize && $i < $row_num; $pg++) { # $Timer2->start();//////////////// if ($light) { $row = mysql_fetch_assoc($rst); if (strlen($row['description'])) { $row['description'] = m_substr($row['description'], 0, 80); } else { $row['description'] = m_substr($row['fullcontent'], 0, 80); } if ($row['title']) {