I tried like
$this->obj->load->library('phpmailer');
$this->obj->load->library('phpmailer/class.phpmailer');
但它会导致 php 错误。请提出解决方案。
为
相同的内容创建自定义加载器。您可以在 codeigniter 的 github 站点上的 codeigniter 教程中找到如何扩展数据库类,从该教程中您可以获得正在发生的事情的提示,然后您可以实现如何创建自定义库加载器,如果没有,您可以使用"core"文件夹,它是库的自动加载器。查看代码点火器的文档。
检查以下链接:
扩展数据库驱动程序
核心类
转到 phpmailer 库并放置此指令
include('phpmailer/class.phpmailer.php');
您的 phpmailer 和文件夹 phpmailer 应该驻留在库文件夹中。您的 phpmailer 文件夹应包含文件 class.phpmailer.php。现在称之为
$this->load->library('phpmailer ');
做!