类/方法/对象路由无法在wamp服务器上的codeigniter中工作,我能够在localhost / ci上加载视图,这是我为codeigniter提供的文件夹但是当我尝试加载方法localhost / ci / method时没有加载。
Please check here is my .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
# Set the rewritebase to your CI installation folder
RewriteBase /ci/
# Send everything to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
这是我的默认控制器,我能够在localhost / ci上加载视图,这是我为codeigniter设置的文件夹,但是当我尝试加载方法localhost / ci / method时,它没有加载。
class Site extends CI_Controller {
public function index()
{
$this->load->view('header');
$this->load->view('style');
$this->load->view('slider');
$this->load->view('content');
$this->load->view('footer');
}
public function aava(){
$this->load->view('header');
$this->load->view('style');``
$this->load->view('slider');
$this->load->view('content');
$this->load->view('footer');
}
}