![]() |
[SOLVED] New Error - 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: [SOLVED] New Error (/showthread.php?tid=65941) |
[SOLVED] New Error - davy_yg - 08-13-2016 Hello, Fatal error: Cannot redeclare Mpages::call_gallery() in C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyGiondaCI\application\models\Mpages.php on line 152 A PHP Error was encountered Severity: Compile Error Message: Cannot redeclare Mpages::call_gallery() Filename: models/Mpages.php Line Number: 152 Backtrace: I am facing this strange error message from my CI program. Maybe someone can help me out! I type this: http://127.0.0.1/CompanyGiondaCI/ I expect my login page would comes out. It seems there is a missing link between the url I type and the program that I appears. config/routes.php PHP Code: $route['default_controller'] = 'cpages/login'; views/login.php PHP Code: <?php $this->load->library('form_validation'); ?> Controllers/Cpages.php PHP Code: public function ceklogin() { RE: New Error - wolfgang1983 - 08-17-2016 (08-13-2016, 10:55 PM)davy_yg Wrote: Hello, I noticed you have not set your base url. This is why ip address is showing in url when submit form may run in to issues if not set. You have also loaded your form validation wrong you have loaded it in view you should load it like so. http://www.codeigniter.com/user_guide/libraries/form_validation.html#the-controller Also in codeigniter 3 versions the default controller in routes does not work in subfolders. And models load like http://www.codeigniter.com/user_guide/general/models.html#anatomy-of-a-model And controllers http://www.codeigniter.com/user_guide/general/controllers.html#let-s-try-it-hello-world Also you seem to be asking a lot of questions I would suggest read through the entire user guide. |