帝国cms栏目调用带链接的关键字词tags

栏目关键字词

直接用变量[!–class.keywords–]调用,显示结果显示“免费分享原创摄影教程,pr剪辑教程,AE特效教程,帝国cms教程,软件素材”
PHP 调用


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 "
  • "; echo $hello[$index];echo "
  • "; } ?>

    最后,在帝国cms,再结合sql查询语句

    
    fetch1("select classpagekey from {$dbtbpre}enewsclass where classid='$GLOBALS[navclassid]'");
    $source=$cr[classpagekey];
    $hello = explode(',',$source); 
    for($index=0;$index<count($hello);$index++) 
    { 
    echo "
  • "; echo $hello[$index];echo "
  • "; } ?>

    链接同步tags标签,如果没有建立标签,就需要到后台手动建立tags,然后系统自动匹配

    
    fetch1("select classpagekey from {$dbtbpre}enewsclass where classid='$GLOBALS[navclassid]'");
    $source=$cr[classpagekey];
    $hello = explode(',',$source); 
    for($index=0;$index<count($hello);$index++) 
    { 
    echo "
  • "; echo $hello[$index];echo "
  • "; } ?>

    发表回复

    您的电子邮箱地址不会被公开。 必填项已用 * 标注