Welcome Guest, Not a member yet? Register   Sign In
Loading a library inside a helper
#1

[eluser]Freewolf[/eluser]
Can I load a library from inside a helper.
I am trying to do it and it does not seem to work, so wondering if I am doing something wrong.

Code:
if ( ! function_exists('send_thank_you'))
{
   function send_thank_you()
   {
        $CI =& get_instance(); // Get the global CI object
        $CI->load->library('email');

        $CI->email->from('[email protected]', 'testing');
        $CI->email->to('[email protected]');

        $CI->email->subject('Thanks.');
        $CI->email->message('Testing the email class.');

        $CI->email->send();

        echo $CI->email->print_debugger();
   }
}


Messages In This Thread
Loading a library inside a helper - by El Forum - 01-20-2011, 05:21 PM
Loading a library inside a helper - by El Forum - 01-21-2011, 03:01 PM
Loading a library inside a helper - by El Forum - 01-21-2011, 03:31 PM
Loading a library inside a helper - by El Forum - 01-21-2011, 04:49 PM



Theme © iAndrew 2016 - Forum software by © MyBB