document.write(
"共有<?php
,require_once(dirname(__FILE__)."
/../include/common.inc.php
");
,$row = $db->GetOne("
select count(*) as fc from dede_feedback
");
,if(!is_array($row)){
,echo "
0
";
,}else {
,echo $row['fc'];
,}
,?>条评论内容!"
);
,第二步:然后在你的模板中需要显示评论总数的地方,加入以下JS代码调用就行:,<script type="text/javascript" src="{dede:field name='phpurl'/}/feedcount.php?aid={dede:field.id/}"></script>,