下吧资源网_专注精品网站源码下载的网站_免费商业源码分享

帝国CMS模板中调用当前栏目下的栏目简介信息的方法

(一)、当前栏目ID或专题ID:

$GLOBALS[navclassid]

  通过这个变量可以输出这个栏目id的所有数据,如:

select * from phome_enewsclass where classid='$GLOBALS[navclassid]'

  (二)、使用范例:调用当前栏目下的栏目简介。

  用SQL标签调用:

[e:loop={"select intro from phome_enewsclass where classid='$GLOBALS[navclassid]'",1,24,0}]
  <?=$bqr[intro]?>
[/e:loop]

  或用PHP调用:

<?php
  $cr=$empire->fetch1("select intro from phome_enewsclass where classid='$GLOBALS[navclassid]'");
  echo $cr[intro];
?>

本文链接:https://www.xiaba.cc/html/202205/893.html

版权声明:站内所有文章皆来自网络转载,只供模板演示使用,并无任何其它意义!

发表评论 共有 0 条评论)

联系客服
网站客服 业务合作 Q交流群
123456789
公众号
公众号
公众号
返回顶部