了解代码点火器,并遵循本教程的这一特定部分:
http://codeigniter.com/user_guide/tutorial/create_news_items.html
一切正常,直到我点击“创建新闻项目”。我收到 404 页面,我的网址栏如下所示:
http://localhost/tut/index.php/news/localhost/tut/index.php/news/create
想想也许这是路线的错误:
$route['default_controller'] = "news/index";
$route['404_override'] = '';
$route['news/(:any)'] = 'news/view/$1';
$route['news'] = 'news'; // what's this for?
$route['news/create'] = 'news/create';
另外,我的config.php:
$config['base_url'] = 'localhost/tut';
有什么想法吗?