blog竟然出BUG了
Submitted by tywtyw2002 on 2007, December 23, 7:30 PM. 心情·随笔
后台没法更新评论,好像也没法发表评论。要不我说最最的评论怎么是异常的少呢^_^
我看了半天源码也没发现问题的所在
PHP代码
-
-
- function newcomments_recache() {
-
- global $DB, $db_prefix;
- $query = $DB->query("SELECT * FROM {$db_prefix}settings");
- $set = array();
- while ($r = $DB->fetch_array($query)) {
- $set[$r['title']] = $r['value'];
- }
- unset($r);
-
- $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']));
- $contents = "\$newcommentcache = array(\r\n";
- $i=0;
-
- while ($newcomment = $DB->fetch_array($newcomments)) {
- $newcomment['content'] = preg_replace("/\[quote=(.*?)\]\s*(.+?)\s*\[\/quote\]/is", "", $newcomment['content']);
- if (emptyempty($newcomment['content'])) {
- $newcomment['content'] = '......';
- }
- $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";
- unset($newcomment);
- $i++;
-
- }
- $contents .= ');';
- writetocache('newcomments',$contents);
-
- }
晕
服务器配置
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
发表评论