添加URL后缀
在你的 config/config.php
文件中你可以指定一个后缀,CodeIgniter 生成 URL 时会自动添加上它。例如,一个像这样的 URL:
example.com/index.php/products/view/shoes
你可以添加一个后缀,如:.html ,这样页面看起来就是这个样子:
example.com/index.php/products/view/shoes.html
Controller Hello World
文件名类名必须大写开头,且继承CI_Controller
类
<?php
class Blog extends CI_Controller {
public function index()
{
echo 'Hello World!';
}
}
production 生产模式
在index.php
中56行将development改为production即可