码迷,mamicode.com
首页 > Web开发 > 详细

获取yii框架HTTP请求的方法

时间:2017-04-20 16:57:48      阅读:223      评论:0      收藏:0      [点我收藏+]

标签:put   isp   key   comment   isa   variable   ble   post   http请求   

$request = Yii::$app->request;

if ($request->isAjax) { /* 该请求是一个 AJAX 请求 */ }
if ($request->isGet)  { /* 请求方法是 GET */ }
if ($request->isPost) { /* 请求方法是 POST */ }
if ($request->isPut)  { /* 请求方法是 PUT */ }

获取yii框架HTTP请求的方法

标签:put   isp   key   comment   isa   variable   ble   post   http请求   

原文地址:http://www.cnblogs.com/pcx105/p/6739492.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!