![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
CI
包包包小姐
这个作者很懒,什么都没留下…
展开
-
CI3.* 获取控制器名、方法名
# 控制器名 $this->router->fetch_class(); # 方法名 $this->router->fetch_method(); 如何在自定义公共方法内调用呢? # 先在自定义方法中添加 $CI = &get_instance(); # 控制器名 $CI->router->fetch_class(); # 方法名 $CI-...原创 2020-03-24 17:53:03 · 271 阅读 · 0 评论 -
CI3.* 创建公共方法
创建公共方法放在 system/helpers 比如文件名为 common_helper.php 调用 $this->load->helper('common');原创 2020-03-24 17:41:24 · 186 阅读 · 0 评论