<?php
// yiiapp/index.php 项目入口文件
// change the following paths if necessary
// 继继的变化路径,如果有必要
// yii核心框加的入口文件目录
$yii=dirname(__FILE__).'/../yii/framework/yii.php';
//当前项目前的配置文件所在目录
$config=dirname(__FILE__).'/protected/config/main.php';
// remove the following lines when in production mode
// 以下之后删除线在生产模式
// 定义YII_DEBUG 也就是调试模式
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);
require_once($yii); //国框架核心文件
//将项目前配置文件传给Yii的createWebApplication()->run()
Yii::createWebApplication($config)->run();