[英]CodeIgniter - how to load library?
I'm using an older version of CodeIgniter when the application
folder was still in system/application
. 当
application
文件夹仍在system/application
时,我正在使用旧版本的CodeIgniter。 I have pulled the application
folder out of system
such that the application
folder is now at the same level as system
. 我已将
application
文件夹拉出system
,使application
文件夹现在与system
处于同一级别。
BEFORE: 之前:
/system/application/
NOW: 现在:
/application/
/system/
Question: how do I now load libraries? 问题:我现在如何加载库? In one of my controllers, I tried this:
在我的一个控制器中,我试过这个:
$config['protocol'] = 'sendmail';
$config['mailpath'] = '/usr/sbin/sendmail';
$config['mailtype'] = 'html';
$config['charset'] = 'iso-8859-1';
$config['wordwrap'] = TRUE;
$this->library('email', $config);
The application dies when it tries to load the email library. 应用程序在尝试加载电子邮件库时死亡。 Suggestions?
建议?
你缺少负载即你需要写$this->load->library('email', $config);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.