Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何在codeigniter中将库中的文件包含到页面中?_Php_Codeigniter - Fatal编程技术网

Php 如何在codeigniter中将库中的文件包含到页面中?

Php 如何在codeigniter中将库中的文件包含到页面中?,php,codeigniter,Php,Codeigniter,但是它会导致php错误。请建议一个解决方案。为相同的问题创建一个自定义加载程序。您可以在codeigniter的github站点上的codeigniter教程中找到如何扩展数据库类,从该教程中,您可以了解正在发生的事情,然后可以实现如何创建自定义库加载器。如果没有,您可以使用“core”文件夹,它是库的自动加载器。检查codeigniter的文档 检查以下链接: 转到phpmailer库并放入此说明 I tried like $this->obj->load->librar

但是它会导致php错误。请建议一个解决方案。

为相同的问题创建一个自定义加载程序。您可以在codeigniter的github站点上的codeigniter教程中找到如何扩展数据库类,从该教程中,您可以了解正在发生的事情,然后可以实现如何创建自定义库加载器。如果没有,您可以使用“core”文件夹,它是库的自动加载器。检查codeigniter的文档

检查以下链接:


转到phpmailer库并放入此说明

I tried like 
$this->obj->load->library('phpmailer');
$this->obj->load->library('phpmailer/class.phpmailer');
phpmailer和文件夹phpmailer应位于库文件夹中。phpmailer文件夹应包含文件class.phpmailer.php。现在叫它

include('phpmailer/class.phpmailer.php');

完成了

你从哪里得到的
$this->obj->load
?@Sujathan你把phpmailer.php文件放在哪里了?@Mihai Iorga我怎么能增加或者怎么接受别人的回答?有没有链接或按钮可以接受答案?嗨,现在看来已经修复了。我删除了第二行代码。谢谢。@SujathanNedumparambu,是在您收到的答案分数下的每个答案上,您都有一个复选标记(✔), 当你的问题解决后,你必须给帮助你的人评分
$this->load->library('phpmailer ');