AI写作智能体 自主规划任务,支持联网查询和网页读取,多模态高效创作各类分析报告、商业计划、营销方案、教学内容等。 广告
Hello 把 方法改为如下: <?php namespace app\\index\\controller; use think\\Request; class Index { public function hello(Request $request) { echo '请求方法:' . $request->method() . '<br/>'; echo '资源类型:' . $request->type() . '<br/>'; echo '访问IP:' . $request->ip() . '<br/>'; echo '是否AJax请求:' . var\_export($request->isAjax(), true) . '<br/>'; echo '请求参数:'; dump($request->param()); echo '请求参数:仅包含name'; dump($request->only(\['name'\])); echo '请 求 参 数 : 排 除name'; dump($request->except(\['name'\])); } } 访问下面的URL地址: <http://tp5.com/index/index/hello/test/ddd.html?name=thinkphp> 页面输出结果为: 请求方法:GET资源类型:html 访问地址:127.0.0.1是否AJax请求:false请求参数: array (size=2) 'test' => string 'ddd' (length=3) 'name' => string 'thinkphp' (length=8) 请求参数:仅包含name array (size=1) 'name' => string 'thinkphp' (length=8) 请求参数:排除name array (size=1) 'test' => string 'ddd' (length=3)