<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Go extends CI_Controller {
public function index()
{
//$this->load->view('welcome_message');
$this->load->helper('url');
$this->load->view('start_view');
$this->load->view('header_view');
$this->load->view('menu_view');
$this->load->view('top_panel_view');
$this->load->view('domaci_view');
$this->load->view('world_view');
$this->load->view('latest_view');
$this->load->view('end_view');
}
public function contest()
{
$this->load->helper('url');
$this->load->view('start_view');
$this->load->view('header_view');
$this->load->view('menu_view');
$this->load->view('end_view');
}
}
当我尝试访问 localhost/site/go/contest 时,我得到一个 404。默认控制器是“Go”。我的一些配置值:
$config['index_page'] = '';
$config['base_url'] = 'http://localhost/sajt/go';
我的 .htaccess 文件:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
有什么问题 ???