PhpCms模板风格:GET标签使用 GET标签使用说明: 我们可能通过GET标签调用本站数据库的信息,也可以调用其他数据库的信息 get 标签可调用本系统和外部数据,适合熟悉SQL语句的人使用。注意:get标签属性值必须用双引号括起来 1、调用本系统单条数据,示例(调用ID为1的信息,标题长度不超过25个汉字,显示更新日期): {get sql="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个汉字,显示更新日期): {get sql="select * from phpcms_content where catid=1 and status=99 order by updatetime desc" rows="10"} 标题:{str_cut($r[title,, 50)} URL:{$r[url]} 更新日期:{date('Y-m-d', $r[updatetime,)} {/get} 3、带分页,示例(调用栏目ID为1通过审核的10条信息,标题长度不超过25个汉字,显示更新日期,带分页): {get sql="select * from phpcms_content where catid=1 and status=99 order by updatetime desc" rows="10" page="$page"} 标题:{str_cut($r[title,, 50)} ...
内容已隐藏,请关注公众号输入验证码查看
本帖支持关注公众号查看
【无套路 无套路 无套路 扫描二维码关注公众号发送【验证码】收到验证码 在上面输入点击提交查看即可显示隐藏内容】
|