标签:span var yii框架 comm str lang string pos lan
$request = Yii::$app->request;
$get = $request->get();
// 等价于: $get = $_GET;
$id = $request->get(‘id‘);
// 等价于: $id = isset($_GET[‘id‘]) ? $_GET[‘id‘] : null;
$id = $request->get(‘id‘, 1);
// 等价于: $id = isset($_GET[‘id‘]) ? $_GET[‘id‘] : 1;
$post = $request->post();
// 等价于: $post = $_POST;
$name = $request->post(‘name‘);
// 等价于: $name = isset($_POST[‘name‘]) ? $_POST[‘name‘] : null;
$name = $request->post(‘name‘, ‘‘);
// 等价于: $name = isset($_POST[‘name‘]) ? $_POST[‘name‘] : ‘‘;
标签:span var yii框架 comm str lang string pos lan
原文地址:http://www.cnblogs.com/pcx105/p/6739432.html