php - Codeigniter controller not found -


i have create controller in codeigniter. problem when hit controller name , function name in url give me error 404 not found. new codeigniter , did not understand going wrong

here controller

<?php if(!defined('basepath')) exit('no direct script access allowed');  class home extends ci_controller{  function __construct(){ parent::__construct(); }  function you(){ $this->load->view('home_view'); }  } ?> 

and view this

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">  <html xmlns="http://www.w3.org/1999/xhtml">  <head>  <meta http-equiv="content-type" content="text/html; charset=utf-8" />  <title>my first codeigniter practice</title>  </head>  <body>  <h1> hello ci buddy...!</h1>  </body>  </html> 

i creating first project on codeigniter , stuck in problem.i try of solution stackoverflow , after asking question. request not add question duplicate. want solution problem. appreciable

thanks

i think there might problem .htaccess file. have .htaccess file in main project directory , written following ?? if not make so..

 rewriteengine on  rewritecond %{request_filename} !-f  rewritecond %{request_filename} !-d  rewriterule ^(.+)$ index.php/$1 [l] 

Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -