500, 'message' => 'System environment settings are not correct!'))); } } // remove the following lines when in production mode defined('YII_DEBUG') or define('YII_DEBUG',true); // specify how many levels of call stack should be shown in each log message defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3); //配置文件存储路径 $configFile=dirname(__FILE__).DIRECTORY_SEPARATOR.'protected'.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'cache'; $config =$configFile.DIRECTORY_SEPARATOR.'main.'.YII_ENV.'.php';; if (! file_exists($config)) { $config=$publicConfig; } // 加载自定义函数 require_once(dirname(__FILE__) . '/protected/config/my_functions.php'); require_once($yii); require_once(dirname(__FILE__) .'/protected/helper/yii.php'); Yii::createWebApplication($config)->run();