CodeIgniter Forums

Full Version: codeigniter calling show_error from a library
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]newtonianb[/eluser]
I can't manage to call show_error from inside a library file I get

Warning: include(application/errors/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

El Forum

[eluser]InsiteFX[/eluser]
When using Libraries you need to get the CI Super Object! You do not need to include other files!
Code:
class lib {

    private $_ci;

    public function __construct()
    {
        parent::__construct();

        $this->_ci = get_instance();
    }

}

// $this->_ci->show_error('etc');

InsiteFX