short-play-api/index.php
2023-01-29 10:26:52 +08:00

46 lines
1.3 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
if(version_compare(PHP_VERSION,'5.4.0','<')) die('require PHP > 5.4.0 !');
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Headers: token,Origin, X-Requested-With, Content-Type, Accept");
header('Access-Control-Allow-Methods: POST,GET');
header('Access-Control-Allow-Credentials: true');
// 定义应用目录
define('APP_PATH', __DIR__ . '/application/');
define('APP_DEBUG', true);
/**
* 项目定义
* 扩展类库目录
*/
define('BASE_PATH', substr($_SERVER['SCRIPT_NAME'], 0, -10));
define('ROOT_PATH', dirname(APP_PATH) . DIRECTORY_SEPARATOR);
define('EXTEND_PATH', ROOT_PATH . 'core' . DIRECTORY_SEPARATOR . 'extend' . DIRECTORY_SEPARATOR);
define('VENDOR_PATH', ROOT_PATH . 'core' . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR);
//邮件
define('ICONV_ENABLED', TRUE);
define('DOMAIN','');
ini_set('session.cookie_path', '/');
ini_set('session.cookie_domain', DOMAIN);//跨域访问Session
//define('BIND_MODULE','novel');
/**
* 缓存目录设置
* 此目录必须可写建议移动到非WEB目录
*/
define ( 'RUNTIME_PATH', __DIR__ . '/data/' );
//define ( 'HTML_PATH', __DIR__ . '/data/html/' );
/** 加载Composer文件 */
require 'vendor/autoload.php';
// 加载框架引导文件
require __DIR__ . '/core/start.php';