【帝国CMS】灵动标签调用TAG的方法
- [e:loop={0,10,3,1,'','newstime DESC'}]
- <?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.a.com/e/tags/?tagname=".urlencode($t[$i])."";
- $tag.="<a href='$tagslink' target='_blank'>".$t[$i]."</a> ";
- }
- }
- echo $tag;
- ?>
- [/e:loop]