常见的phpcms标签调用 

1、调用本系统单条数据
(调用ID为1的信息,标题长度不超过25个汉字,显示更新日期):

  • "select * from phpcms_content where contentid=1" /}
  • 标题:{str_cut($r[title], 50)} URL:{$r[url]}
  • ​更新日期:{date('Y-m-d', $r[updatetime])}

2、调用本系统多条数据
(调用栏目ID为1通过审核的10条信息,标题长度不超过25个汉字,显示更新日期):

  • "select * from phpcms_content where catid=1 and status=99 order by updatetime desc" rows="10"}
  • 'Y-m-d', $r[updatetime])}
  • {/get}

3、带分页
(调用栏目ID为1通过审核的10条信息,标题长度不超过25个汉字,显示更新日期,带分页):

  • "select * from phpcms_content where catid=1 and status=99 order by updatetime desc" rows="10" page="$page"}
  • 'Y-m-d', $r[updatetime])}
  • {/get}

分页:{$pages}

4、自定义返回变量
(调用栏目ID为1通过审核的10条信息,标题长度不超过25个汉字,显示更新日期,返回变量为 $v):

  • "select * from phpcms_content where catid=1 and status=99 order by updatetime desc" rows="10" return="v"}
  • 'Y-m-d', $v[updatetime])}
  • {/get}

5、调用同一帐号下的其他数据库
(调用数据库为bbs,分类ID为1的10个最新主题,主题长度不超过25个汉字,显示更新日期):

  • "bbs" sql="select * from cdb_threads where fid=1 order by dateline desc" rows="10"}
  • //bbs.phpcms.cn/viewthread.php?tid={$r[tid]} 更新日期:{date('Y-m-d', $r[dateline])}
  • {/get}

6、调用外部数据
(调用数据源为bbs,分类ID为1的10个最新主题,主题长度不超过25个汉字,显示更新日期):

  • "bbs" sql="select * from cdb_threads where fid=1 order by dateline desc" rows="10"}
  • //bbs.phpcms.cn/viewthread.php?tid={$r[tid]} 更新日期:{date('Y-m-d', $r[dateline])}
  • {/get}
phpcms v9 get标签各种调用代码锦集

原文标题:phpcms v9 get调用标签整理

原文地址:http://www.abcde.cn/info/show-23-885-1.html

版权归网络时代所有,转载请注明出处

phpcms v9 get调用标签整理的更多相关文章

  1. phpcms v9 常用调用标签(全)

    本文介绍phpcms v9中模板标签使用说明. {template ) {==}   {/,,)}     loop是data的时候用{thumb($v[thumb],,)} 分页标签------{$ ...

  2. phpcms v9中模板标签使用及联动菜单

    {template "content","header"} 调用根目录下phpcms\template\content\header文件 {charset} 字 ...

  3. phpcms v9实现调用多个栏目id的方法

    {pc:content action="position" posid="14" catid="13,14,15,16,17,18,19,20,21& ...

  4. phpcms v9中调用多栏目的方法--get标签(备实例)

    如调用栏目id为1,2,7的栏目列表: {pc:get sql="select * from v9_category where catid IN (1,2,7)"} {loop ...

  5. phpcms v9 模板调用代码大全

    另:每个栏目会对应当前所选模型的三个模板文件:  这些模板文件所在位置:phpcms/templates/default/content/ 目录下,如果想修改模板文件,只需要到此目录下找到对应的模板文 ...

  6. phpcms v9中调用栏目及调用多个子栏目中的文章列表

    调用一个指定栏目列表:            {pc:content action="lists" catid="6" order="id DESC& ...

  7. phpcms v9模版调用代码大全(全面而实用)

    首页调用栏目 {pc:content action="category" siteid="$siteid" num="15" order=& ...

  8. phpcms v9模版调用代码

    首页调用栏目{pc:content action="category" siteid="$siteid" num="15" order=&q ...

  9. phpcms v9 tags调用方法

    {loop $keywords $keyword} <a href="{APP_PATH}index.php?m=content&c=tag&catid={$catid ...

随机推荐

  1. Shadow Register 是什么?

    ARM处理器有个Shadow Register的概念,查了很多资料,语焉不详,究竟是什么意思呢? 这其实是个和硬件有关的概念. 有些register是2层的,第一层是供CPU访问,第二层供Hw访问. ...

  2. Google的一些功能和软件

    本博文的主要内容有 .Google的一些功能和软件 Google的一些功能和软件 1.  iGoogle 2.  Google Earth 3.  Google Talk http://www.goo ...

  3. 放爬虫nginx

    禁止火狐浏览器访问 例子

  4. appium api

    AppiumDriver getAppStrings()      默认系统语言对应的Strings.xml文件内的数据.iOS driver.getAppStrings(Stringlanguage ...

  5. 给iphone模拟器添加照片

    http://blog.csdn.net/StudyRecord/archive/2011/04/06/6305271.aspx 由于模拟器上没有照相机,要向Photos应用程序添加照片,必须按照以下 ...

  6. css开发经验&错误习惯

    CSS开发经验 1.尽量用class来定义样式.尽量少使用  .div1 ul li{}这样的样式下去,因为如果li里面还有<div><ul><li>这些元素的话会 ...

  7. smarty、thinkphp中的html加载其他的html文件的方式

    1.smarty 在模板文件中,使用定界符 {include file="header.html"}  不可以省略.html 2.thinkphp的html文件中 <incl ...

  8. 网络子系统43_ip选项预处理

    //选项格式: // 1.type中指示该选项在分片时是否需要被拷贝 // 2.ptr从1算起,1为type的位置 // 3.len不包括type字段,其余都包括(len,ptr,选项内容) //ty ...

  9. Linux下使用Eclipse开发C/C++程序

          相信好多人和我一样困惑,在网上查各种安装配置方法,可是试了所有的方法也还是没有成功,其实,这个并不能怪网上的方法不对,可能只是你没有点击一个键的原因,下面,我就来讲下怎样使用Eclipse ...

  10. SDL Game Development InputHandler类的一处bug

    个人十分推荐SDL Game Development 这本书,它并不是死抠SDL的api,而是一步步带着我们如何对一个游戏进行构架. 虽然我没用过游戏引擎,也基本不会写游戏,但是我认为这本书本身就是在 ...