开发者

codeigniter calling show_error from a library

开发者 https://www.devze.com 2023-03-08 04:22 出处:网络
I can\'t manage to call show_error from inside a library file I get Warning: include(application/er开发者_StackOverflowrors/error_php.php) [function.include]: failed to open stream: No such file or

I can't manage to call show_error from inside a library file I get

Warning: include(application/er开发者_StackOverflowrors/error_php.php) [function.include]: failed to open stream: No such file or directory in E:\project\SOURCE\system\core\Exceptions.php on line 167


Perhaps you need to create a CI instance?

To access CodeIgniter's native resources within your library use the get_instance() function. This function returns the CodeIgniter super object.

more here

So perhaps something like

$CI =& get_instance();
$CI->show_error('something is not right here . . . ');

Will do what you want.

0

精彩评论

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