1

了解Code Igniter,并遵循本教程的这个特定部分:

http://codeigniter.com/user_guide/tutorial/create_news_items.html

一切正常,直到我单击“创建新闻项目”。我收到404页面,我的 URL 栏如下所示:

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';

有任何想法吗?

4

1 回答 1

1

根据this thead,您的base_url设置不正确。请按照线程的建议。

于 2012-09-27T19:31:35.867 回答