往事依依,随风而行。淡忘过去的一切,在风中迎接新的希望。

blog竟然出BUG了

后台没法更新评论,好像也没法发表评论。要不我说最最的评论怎么是异常的少呢^_^

我看了半天源码也没发现问题的所在

 

PHP代码
  1. // 更新最新评论   
  2.   
  3. function newcomments_recache() {   
  4.   
  5.     global $DB$db_prefix;   
  6.     $query = $DB->query("SELECT * FROM {$db_prefix}settings");   
  7.     $set = array();   
  8.     while ($r = $DB->fetch_array($query)) {   
  9.         $set[$r['title']] = $r['value'];   
  10.     }   
  11.     unset($r);   
  12.   
  13.     $newcomments = $DB->query("SELECT c.commentid, c.articleid, c.author, c.dateline, c.content FROM {$db_prefix}comments c LEFT JOIN {$db_prefix}articles a ON (a.articleid=c.articleid) WHERE a.readpassword = '' AND a.visible='1' AND c.visible='1' ORDER BY commentid DESC LIMIT ".intval($set['recentcomment_num']));   
  14.     $contents = "\$newcommentcache = array(\r\n";   
  15.     $i=0;   
  16.   
  17.     while ($newcomment = $DB->fetch_array($newcomments)) {   
  18.         $newcomment['content'] = preg_replace("/\[quote=(.*?)\]\s*(.+?)\s*\[\/quote\]/is"""$newcomment['content']);   
  19.         if (emptyempty($newcomment['content'])) {   
  20.             $newcomment['content'] = '......';   
  21.         }   
  22.         $contents.="\t'".$i."' => array(\r\n\t\t'commentid' => '".$newcomment['commentid']."',\r\n\t\t'articleid' => '".$newcomment['articleid']."',\r\n\t\t'author' => '".addslashes($newcomment['author'])."',\r\n\t\t'dateline' => '".sadate($set['recent_comment_timeformat'], $newcomment['dateline'])."',\r\n\t\t'content' => '".trimmed_title(htmlspecialchars(addslashes(str_replace(array("\r\n","\n","\r"),'',$newcomment['content']))), $set['recentcomment_limit'])."',\r\n\t),\r\n";   
  23.         unset($newcomment);   
  24.         $i++;   
  25.   
  26.     }   
  27.     $contents .= ');';   
  28.     writetocache('newcomments',$contents);   
  29.   
  30. }   

 

服务器配置

Microsoft-IIS/6.0

mysql-4.0.27-nt-log

zend 3.2.6

php 5.12

win2k3就是诡异,经常抽风,让人无比郁闷

不过我们的服务器还是有过开机128天12小时25分钟的记录~

算了还是等元旦放假在修吧。

Tags: 通知, bug

« 上一篇 | 下一篇 »

17条记录访客评论

测试一下

Post by tywtyw2002 on 2007, December 23, 7:31 PM 引用此文发表评论 #1

不会发完贴bug就没了吧

<自 WAP 发表>

Post by tywtyw2002 on 2007, December 23, 7:44 PM 引用此文发表评论 #2

test

Post by asdfsadffasdda on 2008, January 23, 8:08 PM 引用此文发表评论 #3

abcdefg

Post by abcde on 2008, January 23, 8:09 PM 引用此文发表评论 #4

haolema?~

Post by xjdd on 2008, January 26, 9:07 PM 引用此文发表评论 #5

doorssasa <a href=" http://squ1.org/user/5759 ">directory of all free porn sites</a> clazzz <a href=" http://squ1.org/user/5760 ">alpena business analysis</a>

Post by clazzz on 2010, February 20, 1:55 AM 引用此文发表评论 #6

Hello! gefdfde interesting gefdfde site!

Post by Pharmk787 on 2010, March 8, 9:47 AM 引用此文发表评论 #7

Very nice site! <a href="http://aixypeo.com/ayrava/1.html">cheap viagra</a>

Post by Pharmc99 on 2010, March 8, 9:47 AM 引用此文发表评论 #8

Very nice site!  [url=http://aixypeo.com/ayrava/2.html]cheap cialis[/url]

Post by Pharmd747 on 2010, March 8, 9:47 AM 引用此文发表评论 #9

Very nice site! cheap cialis http://aixypeo.com/ayrava/4.html

Post by Pharmb283 on 2010, March 8, 9:47 AM 引用此文发表评论 #10

Very nice site!

Post by Pharmf308 on 2010, March 8, 9:48 AM 引用此文发表评论 #11

LZjJqL The Web goes wild over home video of a swimming pool being pelted by baseball-sized hail

Post by Yahoo on 2010, May 22, 5:14 PM 引用此文发表评论 #12

SVLayu http://www.f8dpybvfNnMed027gchhA94jc.net

Post by lidia on 2010, May 30, 4:34 AM 引用此文发表评论 #13

PPCchJ Hluyzpb cvowa pshpsu dqwhsqb bfjefje rrdyth wzzpjsa nbbfzahf fgai usbwt.

Post by Wwapfzbe on 2010, July 23, 5:32 PM 引用此文发表评论 #14

doors.txt;10

Post by Alex on 2010, July 23, 8:11 PM 引用此文发表评论 #15

ur6cJW http://fgb7s3Ffjsev7yrbvqqcf7.com

Post by sandy on 2010, August 2, 11:51 PM 引用此文发表评论 #16

ZCTsxV Abnyhj xhtijhqgt szlqko fvzrrbil jgdoqjjltz mzoag fyghqqho nmlvc uupnyxw iehkflyq hzdckxiw.

Post by Rutstecw on 2010, August 16, 5:29 PM 引用此文发表评论 #17


发表评论

评论内容 (必填):