獲取不到 任何
heloo
heloo 2018-01-29 18:15:49
0
2
1312

網址:http://localhost/thinkphp/public/index/Be/demo1/name/think

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

namespace app\index\controller;

#class Be extends \think\Controller
{
##    protected $beforeActionList = [
       //這裡是前置方法
         'before1' => '',
       // 'before2'=> ##        //'before3'=>['except'=>'demo3,demo1'],
   ];

     protected $siteName
 #/#/#前置方法
   protected function before1()
   {
       $this->siteName =$this->request-> #    protected function before2()
   {
#        $this->siteName = '百度中文網2';
   }# 
$ this->siteName = '網易3';
   }


   public function demo1()
   {


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

  ;
   }

heloo
heloo

全部回覆(1)
lge

你在是要從哪裡取得方法的

  • 回覆 url_param_type' => 0, 修改下好了
    heloo 作者 2018-01-30 09:45:00
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!