require_once(dirname(__FILE__)."/../include/common.inc.php");
$row = $db->GetOne("select count(*) as fc from dede_feedback where aid='{$aid}' ");
if(!is_array($row)){
echo "0";
}else {
echo $row['fc'];
}
?>");
2、在需要放置评论数的位置,调用下面的js
代码即可
列表页:<script type="text/javascript" src="[field:global.cfg_phpurl/]/fedcount.php?aid=[field:id/]"></script>
文章页:<script type="text/javascript" src="{dede:field name='phpurl'/}/fedcount.php?aid={dede:field.id/}"></script>
收藏数的解决办法:
1.首先在根目录plus/文件下创建文件名为stowcount.php的php页面,将下面的
代码粘贴进去,记得修改数据库前缀名
document.write("<?php
require_once(dirname(__FILE__)."/../include/common.inc.php");
$row = $db->GetOne("select count(*) as fc from dede_member_stow where aid='{$aid}' ");
if(!is_array($row)){
echo "0";
}else {
echo $row['fc'];
}
?>");
2、在需要放置评论数的位置,调用下面的js
代码即可
列表页:<script type="text/javascript" src="[field:global.cfg_phpurl/]/stowcount.php?aid=[field:id/]"></script>
文章页:<script type="text/javascript" src="{dede:field name='phpurl'/}/stowcount.php?aid={dede:field.id/}"></script>