canyin-project/ybcy/index.php

24 lines
828 B
PHP
Raw Normal View History

2024-11-01 16:07:54 +08:00
<?php
header("Content-type: text/html; charset=utf-8");
/*$cofings=file_exists(('/www/wwwroot/bkycms.com/data/config.php'));
var_dump($cofings);die;*/
// comment out the following two lines when deployed to production
error_reporting(E_ERROR | E_PARSE);
date_default_timezone_set('PRC');
defined('YII_DEBUG') or define('YII_DEBUG', false);
defined('YII_ENV') or define('YII_ENV', 'dev');
define('IN_IA', true);
//// 检测PHP环境 允许前端跨域请求
header("Access-Control-Allow-Origin:*");
//// 响应类型
header('Access-Control-Allow-Methods:GET, POST, PUT, DELETE');
//// 响应头设置
header('Access-Control-Allow-Headers:*');
require __DIR__ . '/vendor/autoload.php';
require __DIR__ . '/vendor/yiisoft/yii2/Yii.php';
$config = require __DIR__ . '/config/web.php';
(new yii\web\Application($config))->run();