好<我尝试使用MAMP在我的localhost上运行CodeIgniter。我在$config['base_url'] = 'http://localhost:8888/codeigniter';
上的config.php中更改了base_url
我也创建了blog.php,就像在我使用的教程中一样:
<?php
class Blog extends Controller {
function index()
{
echo 'Hello World!';
}
}
?>
但是,当我去http://localhost:8888/codeigniter/index.php/blog/
时,我的index.php(&#39; test&#39; - 字符串)的输出,但那里没有hello world,我做错了什么?< / p>
答案 0 :(得分:2)
class Blog extends Controller {
将其更改为
class Blog extends CI_Controller {
模型相同
class Donotmakemodeljokes extends CI_Model {