Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Codeigniter - no input file specified

I am a beginner in Codeigniter and I saw a CI tutorial and was just trying to do a simple thing. I downloaded the CI and added this file to controller directory, but it won't work.

<?php  class site extends CI_Controller {     public function index()     {         echo "Hello World";     }      function dosomething()     {         echo "Do Something";     }    }     ?> 

When I try to access it using http://..../index.php/site I get the output ... "no input file specified" .... by the way, I named the file site.php

like image 945
koool Avatar asked May 25 '11 01:05

koool


1 Answers

Just add the ? sign after index.php in the .htaccess file :

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

and it would work !

like image 106
Ali Mohamed Avatar answered Oct 14 '22 02:10

Ali Mohamed