• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
404 page not found using index as function name in controller

#1
I am new to CI. I am wondering why when I use index as function name, it says page not found. But if change index function name to something else, it display the page. I am trying this on my localhost.

Example code

PHP Code:
class Form extends CI_Controller {


        public function index()
        {
                $this->load->helper(array('form''url'));

                $this->load->library('form_validation');

                if ($this->form_validation->run() == FALSE)
                {
                        $this->load->view('myform');
                }
                else
                {
                        $this->load->view('formsuccess');
                }
        }

Reply

#2
There's no reason why this would happen. Whatever the problem is, it's not the function name.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.