最新公告
  • 欢迎您光临 我爱模板网,本站秉承服务宗旨 履行“站长”责任,销售只是起点 服务永无止境! 立即加入钻石VIP
  • 帝国cms栏目调用带链接的关键字词tags

    正文概述 管理员   2025-09-05   3
    帝国cms栏目调用带链接的关键字词ags

    栏目关键字词
    直接用变量[!--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>";
    }
    ?>


    我爱模板网 » 帝国cms栏目调用带链接的关键字词tags

    发表评论

    如需帝国cms功能定制以及二次开发请联系我们

    联系作者
    script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?587cc1e5c052b5b0ce99533beff13c96"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })();

    请选择支付方式

    ×
    支付宝支付
    余额支付
    ×
    微信扫码支付 0 元