![]() |
how to solve error message : Unable to load the requested file: main_content.php - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: how to solve error message : Unable to load the requested file: main_content.php (/showthread.php?tid=40715) |
how to solve error message : Unable to load the requested file: main_content.php - El Forum - 04-16-2011 [eluser]ded0t[/eluser] hi all, i try to make a login form using CI 2.0 and i got this error message : Unable to load the requested file: main_content.php even, there's a similar question in this thread "http://ellislab.com/forums/viewthread/155359/#751532", i still not understand how to solve that's error. Controller side : login.php Code: <?php View side : login_form.php Code: <div id="login_form"> template.php Code: <?php $this->load->view('includes/header'); ?> header.php Code: <html lang="en"> footer.php Code: </body> Configuration : routes.php Code: $route['default_controller'] = "login"; config.php Code: $config['base_url'] = 'http://localhost/Code2.0/'; autoload.php Code: $autoload['helper'] = array('url','form'); do i missing something? thanks in advance ![]() how to solve error message : Unable to load the requested file: main_content.php - El Forum - 04-16-2011 [eluser]InsiteFX[/eluser] Code: class Login extends CI_Controller { InsiteFX how to solve error message : Unable to load the requested file: main_content.php - El Forum - 04-16-2011 [eluser]ded0t[/eluser] still not working ![]() after added a code "$this->load->vars->($data);", i got error message "Parse error: syntax error, unexpected '(', expecting T_STRING or T_VARIABLE or '{' or '$' in C:\xampp\htdocs\Code2.0\application\controllers\login.php on line 11" any solution? thanks ![]() how to solve error message : Unable to load the requested file: main_content.php - El Forum - 04-16-2011 [eluser]InsiteFX[/eluser] Try changing this: Code: <?php $this->load->view($main_content);?> InsiteFX how to solve error message : Unable to load the requested file: main_content.php - El Forum - 04-16-2011 [eluser]ded0t[/eluser] thanks mr.insiteFX..now it's works! ![]() even there's a little mistake in your code i added Code: $this->load->vars($data); not Code: $this->load->vars->($data); and then, change Code: <?php $this->load->view('main_content');?> on template.php with this code Code: <?php $this->load->view($main_content);?> how to solve error message : Unable to load the requested file: main_content.php - El Forum - 04-16-2011 [eluser]InsiteFX[/eluser] Ya, sorry about that! You can find out about $this->load->vars() in the CodeIgniter User Guide - Loader Class along with a few other ones. InsiteFX |