建站教学网,让你建站更便捷和轻松!
您当前的位置:首页 > CMS建站
帝国cms7.0首页读取TAGS方法
来源:建站教学网  时间:2014-03-18 08:40:30

帝国cms 7.0之前版本首页调用tag的方法是:


[e:loop={0,1,13,1}
<?
            $a="$bqr[infotags]";
            $str=str_replace(',', ',', $a);
            $tag='';
            $t= explode(",", $str);
           
                    for($i=0;$i<count($t);$i++)
                    {
                            if($t[$i])
                            {
                                    $tagslink="http://www.chenwenguang.cn/e/tags/?tagname=".urlencode($t[$i])."";
                                    $tag.="<a href='$tagslink' target='_blank'>".$t[$i]."</a> ";
                            }
            }
            echo $tag;
            ?>
[/e:loop]


帝国cms7.0首页读取TAGS方法是:
[e:loop={0,1,13,1}]
<?php
$newbook1=$empire->query("select * from phome_ecms_news_data_1 where id =".$bqr[id]."");
$r1=$empire->fetch($newbook1);
$a="$r1[infotags]";
            $str=str_replace(',', ',', $a);
            $tag='';
            $t= explode(",", $str);
           
                    for($i=0;$i<count($t);$i++)
                    {
                            if($t[$i])
                            {
                                    $tagslink="http://www.chenwenguang.cn/e/tags/?tagname=".urlencode($t[$i])."";
                                    $tag.="<a href='$tagslink' target='_blank'>".$t[$i]."</a> ";
                            }
            }
            echo $tag;
?>
[/e:loop]

 

帝国cms关键字读取的方法

<?
$a=$navinfor[keyboard];
$str=str_replace(',', ',', $a);
$tag='';
$t= explode(",", $str);

        for($i=0;$i<count($t);$i++)
        {
                if($t[$i])
                {
                        $tagslink="http://www.chenwenguang.cn/e/sch/index.php?keyboard=".urlencode($t[$i])."";
                        $tag.="<a href='$tagslink' target='_blank'>".$t[$i]."</a> ";
                }
}
echo $tag;
?>
 

责任编辑:风中的自由

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表
CopyRight 2008-2009, chenwenguang.cn, Inc. All Rights Reserved
皖ICP备09015033号