菜鸟询问:controller里面的方法可否改为 例如 indexAction(){} ?
因为在别的框架里用这种 比较习惯还有assign() 和render()
请问CI支持这样的吗? 结合smarty后 可以 最简单的就在system/core/Router.php里面
把
function fetch_method()
{
if ($this->method == $this->fetch_class())
{
return 'index';
}
//$this->method = $this->method . 'Action'; 加上这句
return $this->method;
}
render方法你可以在loader里面加上这个方法。 本帖最后由 dickfu 于 2013-3-26 19:49 编辑
Action那个改扩展CI_Route写个MY_Route
assign和render自己扩展CI_Controller,实现这两个方法呗,
里面就是this->load->vars和this->load->view
就行了呗
页:
[1]