codeigniter calling show_error from a library
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.
精彩评论