
CI框架
木偶跳舞
个人博客
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
CI 添加公共函数 全局函数 自定义函数
CodeIgniter 中公共函数可以通过 helper 辅助函数实现。创建 common_helper.php 文件,定义所需公共函数,存放至 application/helpers 目录中。在 application/config/autoload.php 中配置 $autoload[‘helper’] = array(‘common’); 即可。转载 2016-12-14 11:25:34 · 4483 阅读 · 0 评论 -
CI 框架各类库的加载方法
1、核心类库引用核心类库位于 system/core/ 自动加载控制器中使用方式: 直接使用$aa = $this->config->base_url(); $bb = $this->uri->uri_string();其他位置使用:$CI = &get_instance(); $aa = $CI->config->base_url(); $aa = $CI->uri->uri_string()原创 2017-01-04 18:25:18 · 7073 阅读 · 0 评论