Welcome Guest, Not a member yet? Register   Sign In
Accessing $this->load->view from global functions
#1

[eluser]koniciwa[/eluser]
Need help accessing $this->load->view from a global function (which isn't in a class). A sort of wrapper function that saves me from typing $this->something. As expected, $this doesn't work outside a class.
Thanks in advance Smile
#2

[eluser]Phil Sturgeon[/eluser]
Code:
$CI =& get_instance();
$CI->load->view('blerf');
#3

[eluser]koniciwa[/eluser]
Thanks mate! Works like a charm... didn't know it could work outside the 'libraries' context.




Theme © iAndrew 2016 - Forum software by © MyBB