0
我剛開始使用CodeIgniter,我被卡在文檔中的hello世界代碼。每次我在網址欄中的博客控制器的名稱類型,並敲回車,我得到這個錯誤:
本地主機/ PHP /笨/的.htaccessCodeignite hello世界代碼在文檔doent工作
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
路線.PHP
$route['default_controller'] = 'welcome';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
的config.php
$config['base_url'] = 'http://localhost/php/CodeIgniter/';
$config['index_page'] = 'index.php';
控制器/ blog.php的
<?php
class Blog extends CI_Controller {
public function index()
{
echo 'Hello World!';
}
}
我該如何解決?