Can't get any
heloo
heloo 2018-01-29 18:15:49
0
2
1352

Website: http://localhost/thinkphp/public/index/Be/demo1/name/think

—————————————————— ——————————

namespace app\index\controller;

class Be extends \think\Controller
{

protected $beforeActionList = [
                                //                                                                                                                                                         to                              . ##       //'before3'=>['except'=>'demo3,demo1'],
    ];

            protected $siteName;

          //Write here Pre-method
protected function before1()
{
$this->siteName =$this->request->param('name');
}

protected function before2()
{
$this->siteName = 'Baidu Chinese Network 2';
}

protected function before3()
{
$ this->siteName = 'NetEase 3';
}


public function demo1()
{
  return $this->siteName;
}

public function demo2()
{
return $this->siteName;
}

public function demo3()
{
return 'ss3' ;
}

heloo
heloo

reply all(1)
lge

Where do you want to get the method from?

  • reply url_param_type' => 0, please modify it
    heloo author 2018-01-30 09:45:00
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template