<?php
namespace appadmincontroller;
use thinkController;
use thinkfacadeRequest;
class Demo extends Controller
{
public function login($code = '', $nickname = '', $thumb = '', $gender = '')
{
//第一种判断
if (!request()->isPost()) {
return;
}
//第二种判断
if (!$this->request->isPost()) {
return;
}
$data = $this->request->post();//第二种接受参数
$data = input('post.');//第三种接受参数
//还有两种。。。
$code = Request::param('code'); //Facade机制调用
$code = request()->param('code'); //助手函数
}
}