CodeIgniter中Router类的两个方法
来源:互联网 发布:阿里云学校 编辑:程序博客网 时间:2024/04/29 23:03
File:
/* Location: ./system/core/Router.php */
第一个:
/** * Fetch the current method * * @accesspublic * @returnstring */function fetch_method(){if ($this->method == $this->fetch_class()){return 'index';}return $this->method;}
第二个:
/** * Fetch the current class * * @accesspublic * @returnstring */function fetch_class(){return $this->class;}
第一个主要是获取当前请求的method,也就是controller下的action,
第二个主要是去当前访问的controller。
详情请看该类的代码。
因为这两个方法经常在做权限控制的时候需要用到,之前采用了如下的方式来取取得controller和method,不是很好。所以推荐使用上面的两个方法。
$this->CI->uri->segment(1)
- CodeIgniter中Router类的两个方法
- codeIgniter中发送邮件的调用方法
- codeigniter搭配php 5.3中两个值得注意的问题
- CodeIgniter框架源码笔记(6)——支持友好的URI地址:路由类Router.php
- CodeIgniter的扩展方法
- CodeIgniter-Router的BUG(3.0.0版本)
- CodeIgniter中分页类的使用
- 在CodeIgniter中创建自己的类
- codeigniter源代码分析之路由处理类 Router.php
- 隐藏CodeIgniter程序URL中index.php的方法
- GEF中同时使用两个Router
- CodeIgniter中表格的使用
- Backbone中Router的使用
- CodeIgniter框架源码学习之路由类--Router.php
- CodeIgniter源码分析之Router.php
- Java中File类中方法应用的两个例子
- CodeIgniter 里集成 FCKeditor 的方法
- Zend Framework 與 CodeIgniter 網址傳遞參數的方法!!
- Y - Picture
- Z - Atlantis
- B - Mayor's posters
- No embedded stylesheet instruction for file:奇怪的错误
- 跳槽
- CodeIgniter中Router类的两个方法
- 请问高手为什么我写的矩阵键盘为什么显示10的时候就挑不出去了?
- note
- 显示或隐藏MacOS中的隐藏文件
- zoj1242
- .net 开源搜索引擎,C#搜索引擎开源,C#开源搜索引擎,.net搜索引擎开源
- 利用url进行http请求
- h.264 rtp打包
- .net 开源搜索引擎,C#搜索引擎开源,C#开源搜索引擎,.net搜索引擎开源