模板支持直接输出Request请求对象的方法参数,用法如下:

$Request.方法名.参数

例如:

{$Request.get.id}
{$Request.param.name}

$Request.开头的变量输出会认为是系统Request请求对象的参数输出。

支持Request类的大部分方法,但只支持方法的第一个参数。

下面都是有效的输出:

// 调用Request对象的get方法 传入参数为id{$Request.get.id}// 调用Request对象的param方法 传入参数为name{$Request.param.name}// 调用Request对象的param方法 传入参数为user.nickname{$Request.param.user.nickname}// 调用Request对象的root方法{$Request.root}// 调用Request对象的root方法,并且传入参数true{$Request.root.true}// 调用Request对象的path方法{$Request.path}// 调用Request对象的module方法{$Request.module}// 调用Request对象的controller方法{$Request.controller}// 调用Request对象的action方法{$Request.action}// 调用Request对象的ext方法{$Request.ext}// 调用Request对象的host方法{$Request.host}// 调用Request对象的ip方法{$Request.ip}// 调用Request对象的header方法{$Request.header.accept-encoding}


 小秋同学  模板  2021-03-24 09:13:45    收藏:  赞(669)
学习吧_一个不错的学习网站
本文地址:https://www.qiuhai.com/doc/1558.html 复制链接 如果还有疑问,欢迎加入我们的QQ交流群:887790 加入Q群 易优最新程序下载: 点击下载
QQ在线咨询