欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

自定义函数里 使用库文件 library文件 帮助文件 helper 文件 模型文件 model 文件

$this->ci = & get_instance(); 
$this->ci->load->library('session');
这样就可以用了。
不过用的时候也得这样用。如this->ci->session->userdata

可以见  
http://codeigniter.org.cn/user_guide/general/creating_libraries.html 
来自 http://codeigniter.org.cn/forums/thread-14317-1-1.html


普通分类: