phpcms v9 get调用标签整理
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 常用调用标签(全)
本文介绍phpcms v9中模板标签使用说明. {template ) {==} {/,,)} loop是data的时候用{thumb($v[thumb],,)} 分页标签------{$ ...
- phpcms v9中模板标签使用及联动菜单
{template "content","header"} 调用根目录下phpcms\template\content\header文件 {charset} 字 ...
- phpcms v9实现调用多个栏目id的方法
{pc:content action="position" posid="14" catid="13,14,15,16,17,18,19,20,21& ...
- phpcms v9中调用多栏目的方法--get标签(备实例)
如调用栏目id为1,2,7的栏目列表: {pc:get sql="select * from v9_category where catid IN (1,2,7)"} {loop ...
- phpcms v9 模板调用代码大全
另:每个栏目会对应当前所选模型的三个模板文件: 这些模板文件所在位置:phpcms/templates/default/content/ 目录下,如果想修改模板文件,只需要到此目录下找到对应的模板文 ...
- phpcms v9中调用栏目及调用多个子栏目中的文章列表
调用一个指定栏目列表: {pc:content action="lists" catid="6" order="id DESC& ...
- phpcms v9模版调用代码大全(全面而实用)
首页调用栏目 {pc:content action="category" siteid="$siteid" num="15" order=& ...
- phpcms v9模版调用代码
首页调用栏目{pc:content action="category" siteid="$siteid" num="15" order=&q ...
- phpcms v9 tags调用方法
{loop $keywords $keyword} <a href="{APP_PATH}index.php?m=content&c=tag&catid={$catid ...
随机推荐
- Kafka中错误:Unrecognized VM option ‘UseCompressedOops’ Error: Clould not create the Java Vritual Machine. Error: A fatal exception has occurres . Program will exit.
错误的描述: 在kafka安装目录下,执行 $ bin/zookeeper-server-start.sh config/zookeeper.properties & Unrecognized ...
- windows 下文件上传到fastdfs
php.ini 配置 [fastdfs]; the base pathfastdfs_client.base_path = D:/tmp ; connect timeout in seconds; d ...
- PHP——四种基本排序算法
分别用冒泡排序法,快速排序法,选择排序法,插入排序法将下面数组中的值按照从小到大的顺序进行排序. $arr(1,43,54,62,21,66,32,78,36,76,39); 1. 冒泡排序 思路分析 ...
- Excel.Application SaveAs 把excel转换为html
Excel.Application SaveAs 中的第二个参数的值: 可以直接用 10 进制的值代替左边的这些 xl 类型 . 例如:把excel转换为html的js: var oWB = oXL. ...
- Hash表——The Hash table
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "list.h&q ...
- spring mvc DispatcherServlet详解之二---request通过Controller获取ModelAndView过程
整个spring mvc的架构如下图所示: 上篇文件讲解了DispatcherServlet通过request获取控制器Controller的过程,现在来讲解DispatcherServletDisp ...
- 浏览器中JavaScript执行原理
本章我们讨论javascript在浏览器中是如果工作的,包括:下载.解析.执行的全过程.javascript的这些讨人嫌的地方我们是知道的: i.需要串行下载 ii.需要解析 iii.需要串行执行 而 ...
- c++中返回对象与返回引用的区别
这几天在做用C++做课程设计,对其返回对象的实现感到迷惑. 通过对汇编代码的分析,可以清楚的看到,直接返回引用和返回对象的区别到底是什么. 分析的程序如下 #include<cstdio> ...
- 安装Visual Studio 2013 中文社区版
Visual Studio 2013 免费了,我收到邮件后,立即从邮件的下载连接安装了 Visual Studio Community 2013 with Update 4 . 安装后几天没打开,今天 ...
- n进制转为十进制
主程序代码 - #include <stdio.h> #include <string.h> main() { long t1; int i, n, t, t3; ]; pri ...