且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何获取Controller,Action,URL信息与CodeIgniter

更新时间:2023-11-19 17:04:22

您可以使用 URI类

$this->uri->segment(n); // n=1 for controller, n=2 for method, etc

以下工作,但目前无法测试:

I've also been told that the following work, but am currently unable to test:

$this->router->fetch_class();
$this->router->fetch_method();