Reputation: 63
please help me with the below code. I'm trying to assess base_url helper from Mylib(external library)
Class Mylib{
public function url() {
$ci = &get_instance();
$ci->load->helper('url');
return base_url();
}
}
Upvotes: 1
Views: 95
Reputation: 38584
No its works fine. Check this.
class Mylib {
protected $CI;
public function __construct()
{
$this->CI =& get_instance();
}
public function url(){
this->CI->load->helper('url');
redirect();
}
}
Upvotes: 1