开发者

CodeIgniter: Weird echo of $config coming back when I load Email Library

开发者 https://www.devze.com 2022-12-28 04:14 出处:网络
Version info: CI version 1.7.2 - PHP 5.3.1 - Apache2 - Mac OSX 10.6.3 For some reason, when I load CI\'s email library, either in my controller, or in autoload.php, it automatically and immediately e

Version info: CI version 1.7.2 - PHP 5.3.1 - Apache2 - Mac OSX 10.6.3

For some reason, when I load CI's email library, either in my controller, or in autoload.php, it automatically and immediately echoes the config info like so:

$config['protocol'] = 'sendmail';
$config['mailpath'] = '/usr/sbin/sendmail';
$config['charset'] = 'iso-8859-1';
$config['wordwrap'] = TRUE

If I autoload the email library in autoload.php, it is echoed before anything else in my source/page. If I call it explicitly within my开发者_高级运维 controller, it's echoed at that exact point.

I'm stumped, never seen that before. Any ideas on how to surpress/eliminate?

Loading the library in autoload: $autoload['libraries'] = array('database','encrypt','email');

Loading the library in the controller: $this->load->library('email');


Seems rather odd. I'm using this library succesfully with the same CI version.

What is also odd is that the config values being printed are not the CI defaults!

Where are you setting the config values?

Are you definitely sure you're not setting the config anywhere else? e.g. in a config file in your config folder and accidently printing them here? This would explain both why the values are not defaults and they're only appearing when the class is loaded since it checks for a config file first.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号