Codeigntier extend Email library ci 3.0.4

匿名 (未验证) 提交于 2019-12-03 01:45:01

问题:

I have trying to override the email library by doing the following steps:

  1. Create file core/MY_Email.php
  2. In file add code below

    <?php class MY_Email extends CI_Email {      public function __construct()     {         parent::__construct();     } ?> 
  3. Load library is normal

        $this->load->library('email'); 

I put a die in the top of my class and it appears to not even be included and just uses the regular system email class. I need to extend it to override _smtp_connect(). I have done this with other classes.

I am using CI 3.0.4. I have tried to trace through the loader class; but cannot figure it out.

回答1:

Put MY_Email.php in application/libraries



回答2:

You need to put the file in application/libraries NOT application/core



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!