Reputation: 23
I have test my first code but had this error message:
An Error Was Encountered
Unable to load the requested file: first.php
<?php
class Ow extends CI_Controller {
public function index($a){
$this->load->view('first');
}
}
?>
Upvotes: 0
Views: 8768
Reputation: 61
use this .htaccess file in your root directory
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|(.*)\.swf|forums|images|css|downloads|jquery|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php?$1 [L,QSA]
Upvotes: 0
Reputation: 2888
On your views
folder (application/views). add first.php
file since it doesn't exists as said in your error message
Example Folder structure:
appname
Upvotes: 1