yii初始化控制器的兩種方法

public function __construct($id, $module, $config = [])
{
    parent::__construct($id, $module, $config = []);
    ##########(要初始化的其他內容)#######################
}

public function init()
{
    ##########(要初始化的其他內容)#######################
}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章