1、返回当前请求所在的控制器:$this->router->fetch_class();
2、返回当前请求所在的方法:$this->router->fetch_method()。
config 类的三个辅助函数也比较有用。(假设项目的url为:http://localhost/ci/test/index.php)
3:$this->config->site_url(); // http://localhost/ci/test/index.php
该函数得到你网站的 URL,其中包含了你在 config 文件中设置的 "index" 的值。
4:$this->config->base_url(); // http://localhost/ci/test
5:$this->config->system_url(); // http://localhost/ci/test/system/
该函数得到 system folder 的URL .