栏目关键字词
直接用变量[!–class.keywords–]调用,显示结果显示“免费分享原创摄影教程,pr剪辑教程,AE特效教程,帝国cms教程,软件素材”
PHP 调用
<?php
$cr=$empire->fetch1("select classpagekey from {$dbtbpre}enewsclass where classid='$GLOBALS[navclassid]'");
echo $cr[classpagekey];
?>
按逗号分离字符串
<?php
$source = "免费分享原创摄影教程,pr剪辑教程,AE特效教程,帝国cms教程,软件素材";//按逗号分离字符串
$hello = explode(',',$source);
for($index=0;$index<count($hello);$index++)
{
echo "<li>"; echo $hello[$index];echo "</li>";
}
?>
最后,在帝国cms,再结合sql查询语句
<?php
$cr=$empire->fetch1("select classpagekey from {$dbtbpre}enewsclass where classid='$GLOBALS[navclassid]'");
$source=$cr[classpagekey];
$hello = explode(',',$source);
for($index=0;$index<count($hello);$index++)
{
echo "<li>"; echo $hello[$index];echo "</li>";
}
?>
链接同步tags标签,如果没有建立标签,就需要到后台手动建立tags,然后系统自动匹配
<?php
$cr=$empire->fetch1("select classpagekey from {$dbtbpre}enewsclass where classid='$GLOBALS[navclassid]'");
$source=$cr[classpagekey];
$hello = explode(',',$source);
for($index=0;$index<count($hello);$index++)
{
echo "<li><a href='/e/tags/?tagname=$hello[$index]&tempid=8'>"; echo $hello[$index];echo "</a></li>";
}
?>
1、如非特殊说明,本站对本文提供的代码或者素材不拥有任何权利,其版权归原著者拥有。
2、以上提供的代码或者素材均为作者提供和网友推荐收集整理而来,仅供学习和研究使用。
3、如有侵犯你版权的,请来信(邮箱:admin@mail.52muban.com)指出,核实后,本站将立即改正。
4、如有链接无法下载、失效或广告,请点击下面的报错或者联系我们处理!
5、以上资源售价只是赞助,不代表代码或者素材本身价格。收取费用仅维持本站的日常运营所需!
6、本站所有资源、教程、源码,不得用于非法站点及用途,后果自负!本站不为非法站点提供任何服务。
我爱模板网 帝国cms教程 帝国cms栏目调用带链接的关键字词tags https://www.52muban.com/129376.html


常见问题