Codeigniter - no input file specified

Hi, I am new to Codeigniter and I saw a CI tutorial and was just trying to do a simple thing. I downloaded CI and added this file to the controller directory, but it will not 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

+72
php codeigniter
May 25 '11 at 1:56
source share
4 answers

I found the answer to this question here ..... The problem was hosting the server ... I thank everyone who tried .... I hope this helps others.

Godaddy Installation Tips

+33
May 25 '11 at 2:33
source share

Just add a character ? 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 will work!

+255
Oct 25
source share

Godadi hosting seems to be fixed on .htaccess , it works

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

to

 RewriteRule ^(.*)$ index.php?/$1 [QSA,L] 
+47
Mar 18 '13 at 13:38 on
source share

RewriteEngine, DirectoryIndex in .htaccess CodeIgniter application file

I just changed the contents of the .htaccess file and as shown below in the links . And I tried to refresh the page (which did not work and could not find a request to my controller), it worked.

Then, just because of my doubts, I canceled the changes that I made with my .htaccess inside my public_html folder to the original .htaccess content, so now now (what was originally):

 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] 

And now it also works.

Tip: It seems that before the rewrite rules were not clearly configured in the server context.

My file structure is as follows:

 / |- gheapp | |- application | L- system | |- public_html | |- .htaccess | L- index.php 

And in index.php I set the following paths to the system and application:

 $system_path = '../gheapp/system'; $application_folder = '../gheapp/application'; 

Note: by doing this, our application source code is first hidden to the public.

Please, if you guys find something wrong with my answer, please comment and review me!
Hope beginners find this answer helpful.

Thank!

+13
Nov 22 '14 at 6:57
source share



All Articles