I have this templates folder in my new hmvc project that I am setting up.
For my controllers
Template.php codes
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Template extends MX_Controller{
function view(){
$this->load->view('one_view');
}
}
?>
one_view.php
<h1>Hello</h1>
When I go to my browser and type:
localhost/ci_hmvc/templates/view
it always says that 404 Page Not Found. No matter what tutorial I watch its almost the same code and I copied every code they use but it doesnt work.
P.S: I am using htaccess so theres no index.php in my url.
It should be:
Your controller and file name is
Template
andTemplate.php
notTemplates
Side Note:
Or if you still want to use as templates than add route for this controller as:
Second solution is that, change your file and controller name as
templates
.