1. 程式人生 > >thinkphp5 tp5 獲取模塊名控制器名方法名

thinkphp5 tp5 獲取模塊名控制器名方法名

php5 name fun 方法名 ech use style 控制 public

<?php
namespace app\index\controller;

use think\Db;
use think\Controller;
class Base extends Controller
{
    public function _initialize(){
        $no_check = array("login","login_check");
        $request = \think\Request::instance();
        echo $request->controller();
        
echo $request->module(); echo $request->action(); } }

thinkphp5 tp5 獲取模塊名控制器名方法名