How to call codeigniter controller function from view? When i call the function in a controller, get a 404 page.
class MY_Controller extends CI_Controller { public $CI = NULL; public function __construct() { parent::__construct(); $this->CI = & get_instance(); } public function yourMethod() { } } // in view just call $this->CI->yourMethod();