Welcome Guest, Not a member yet? Register   Sign In
codeigniter calling show_error from a library
#1

[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
#2

[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




Theme © iAndrew 2016 - Forum software by © MyBB