Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道是否可以从控制器或库中检索 config/route.php 中设置的默认控制器?
我已经尝试过$this->load->config('route'),但没有奏效。
$this->load->config('route')
您可以通过以下方式访问默认控制器;
$this->router->default_controller
尝试以下行。希望它对你有用。
$this->router->fetch_class();