No input file specified code igniter

No input file specified code igniter

Hi 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.


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

Just changed the .htaccess file contents and as shown 

Then just because of my doubt I undone the changes I did to my .htaccess inside my public_html folder back to original .htaccess content. So it’s now as follows (which is originally it was):

DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index.php|images|css|js|robots.txt|favicon.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ ./index.php?/$1 [L,QSA]

Related posts

Leave a Comment