0

I made a website in codeigniter . it is working fine on local host and on the live server it is opening the default controller normally but when i m tring to call other controller then i m getting error of No input file specified. everything is working fine on local host .

class Contact_us extends CI_Controller {

public function index()

   {

       echo  $data["header"] = $this->load->view('header');

        //$this->load->view('index',$data); 

    }   

}

I am calling my controller like mysitename/index.php/contact_us

9
  • What host are you using? Commented Feb 28, 2015 at 11:35
  • Do you use index.php in your URL? Commented Feb 28, 2015 at 11:36
  • yes i am using index.php in my url Commented Feb 28, 2015 at 11:41
  • You can check this answer .htaccess problem: No input file specified There also solution for GoDaddy users. Commented Feb 28, 2015 at 11:51
  • Do you have a header controller that your trying to get data from? If so you would have to put the same header data in to the contact us. For your issue would look into codeigniter hmvc bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc much more dynamic. Commented Feb 28, 2015 at 13:45

1 Answer 1

0

it works with change in htaccess file like

 DirectoryIndex index.php
 RewriteEngine on

 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule ^(.*)$ ./index.php?$1 [L,QSA]

and put $config['index_page'] = ""; in the config file so now my site url becomes like mysitename/contact_us

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.