<?php

if($_GET['m'] && $_GET['c']){
    if($_SERVER['SERVER_NAME']=="www.qqe2.com"&&($_GET['m']!="content" || $_GET['c']!="index")){header("location: /404.html");die; }//屏蔽执行其他php入口

    define('PHPCMS_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR);
    //禁止写入执行文件
    if(strstr($_SERVER['REQUEST_URI'],"file_put_content") || strstr($_SERVER['REQUEST_URI'],"@eval(")){
        echo "非法参数";die;
    }
    //关闭member用户功能
    if($_GET['m']=="member"){echo "member功能已关闭,请联系管理员";die; }
    include PHPCMS_PATH.'/phpcms/base.php';
    //纯下载站的入口文件增加代码，禁止外人POST数据和上传文件
    //	if(file_get_contents("php://input") || (isset($_POST) && count($_POST)>0) ||  (isset($_FILES) && count($_FILES)>0)){
    //	    if ($_SERVER['SERVER_NAME'] != substr($_SERVER['HTTP_REFERER'], 7, strlen($_SERVER['SERVER_NAME']))) exit('no upload');
    //	}
    pc_base::creat_app();
}else{

    // comment out the following two lines when deployed to production
    #defined('YII_DEBUG') or define('YII_DEBUG', true);
    #defined('YII_ENV') or define('YII_ENV', 'dev');
    require __DIR__ . '/../vendor/autoload.php';
    require __DIR__ . '/../vendor/yiisoft/yii2/Yii.php';
    $config = require __DIR__ . '/../config/web.php';
    (new yii\web\Application($config))->run();
}




