routes - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: routes (/showthread.php?tid=65021) |
routes - davy_yg - 04-21-2016 Hello, I am trying to access views/blog_form.php but do not know what to type in the url to access that. Can anyone explain how to? I can access blog by typing localhost/blog but not the next one. routes.php PHP Code: $route['default_controller'] = 'blog'; controllers/Blog.php PHP Code: class Blog extends CI_Controller { RE: routes - paulkd - 04-21-2016 localhost/blog_form Place the route above the default_controller RE: routes - davy_yg - 04-25-2016 I did place the routes above the config/routes.php routes.php PHP Code: $route['blog_form'] = 'blog/blog_form'; views/blog_form.php PHP Code: <html> I still have: BLOG FORM Fatal error: Call to undefined function validation_errors() in C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\blog\application\views\blog_form.php on line 11 A PHP Error was encountered Severity: Error Message: Call to undefined function validation_errors() Filename: views/blog_form.php Line Number: 11 Backtrace: line 11: <?php echo validation_errors(); ?> How fix the error? RE: routes - hipm - 04-25-2016 Load this helper: $this->load->helper('form'); |