<?php
date_default_timezone_set("Asia/Shanghai");
mb_internal_encoding("UTF-8");
define("TIMESTAMP",time());
define("APPLICATION_PATH", realpath(dirname(__FILE__) . '/../'));
define("APP_ENV",ini_get('yaf.environ'));
if(APP_ENV=='develop'){
    error_reporting(E_ALL ^ E_NOTICE);
}
if(APP_ENV=='test' || APP_ENV=='pre' ||APP_ENV=='ccwdevelop'){
    if(isset($_POST['data']['debug'])&&!empty($_POST['data']['debug'])){
       // define("DEBUG",1);
        error_reporting(E_ALL);
    }else{
        error_reporting(0);
    }
}
$app = new \Yaf\Application(APPLICATION_PATH . "/conf/application.ini", APP_ENV);
$app->bootstrap()->run();
