Welcome Guest, Not a member yet? Register   Sign In
Cannot Call Method of Default Controller
#1

[eluser]Unknown[/eluser]
I know that there is familiar problem like my
http://ellislab.com/forums/viewthread/177251

But, please read it.

I have default controller:
Code:
<?php

class Main extends CI_Controller {


function __construct()
{
  parent::__construct();

}

public function index()
{

  $head['title'] = $this->config->item('title');
  $head['base'] = $this->config->item('base_url');
  $head['css'] = $this->config->item('css');
  $head['ga'] = $this->config->item('ga');

  $header['left_title'] = 'left_title';
  $header['right_menu'] = 'right_menu';

  $data['head'] = $this->load->view('head',$head);
  $data['header'] = $this->load->view('header',$header);
  $data['body'] = $this->load->view('home');

  $this->load->view('main',$data);
}

public function login()
{
   // same as the index()
}

}


?>

My base url is "http://localhost/sch/". I can call the default controller by clicking this url base "http://localhost/sch/". My application/config/routes.php:

Code:
$route['default_controller'] = "main";
$route['404_override'] = '';

$route['login'] = "index.php/main/login";

But i can't call the method login() of default controller by clicking this "http://localhost/sch/login" !

And my index page:
Code:
$config['index_page'] = 'index.php';


Messages In This Thread
Cannot Call Method of Default Controller - by El Forum - 01-15-2013, 03:01 AM
Cannot Call Method of Default Controller - by El Forum - 01-15-2013, 03:20 AM
Cannot Call Method of Default Controller - by El Forum - 01-15-2013, 03:38 AM
Cannot Call Method of Default Controller - by El Forum - 01-15-2013, 04:13 AM
Cannot Call Method of Default Controller - by El Forum - 01-15-2013, 04:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB