如果在控制器中必须使用构造函数时,必须先调用基类的构造函数; 否则会在使用CI的基础类或是其它功能就会出现不存在错误 function __construct() { parent::__construct(); }