thinkphp 请求对象
一般来说有 5种方法使用请求对象
1.继承Controller父类
<?php
namespace app\index\controller;
use think\Controller;
class Index extends Controller
{
public function index()
{
return $this->request->param('name');
}
}
2.使用构造函数
<?php
namespace app\index\controller;