• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
route not working.

#1
i am a beginner in codeigniter i have just made one controller user.php and changed my default route to user.but its not working.
my route.php is
$route['default_controller'] = "user";
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;



my user.php controller is
<?php
class User extends MY_Controller{

    public function index()
    {
        $this->load->view('public/articcle_lst');
    }
}


view file is
<!doctype html>
<html lang="en">
<head>
<meta charset="Utf-8">
<title>Article List</title>

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"></head>
<body>
<h1>hello</h1>
</body>
</html>
url i am inserting is 127.0.01/codeigniter/user.
Reply

#2
user.php => User.php if you use Codeigniter 3xx

try it
localhost/codeigniter/ or localhost/codeigniter/index.php/user
Reply

#3
What do you mean by "not working"? Do you get an error message?
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.