<?php /** * index.php */ // Phalcon Debugger Listen to Exceptions Globally defined('APP_DEBUG') or define('APP_DEBUG', true); $debug = new \Phalcon\Debug(); $debug->setUri('//static.pails.xueron.com/debug/3.0.x/'); // 国内CDN静态资源 $debug->listen(); require_once __DIR__ . '/../vendor/autoload.php'; $container = new Pails\Container(dirname(__DIR__)); $container->run(App\Http\Application::class);
* @author : Hunter.<*****@*****.**> * @Description : 入口文件 * 上线后需要做以下事项: * 1:关闭调试 index.php DEBUG 0 * APP_DEBUG 0 */ if (version_compare(PHP_VERSION, '5.3.0', '<')) { die('要求 PHP > 5.3.0 !'); } define('DEBUG', true); define('APP_DEBUG', true); if (DEBUG) { error_reporting(E_ALL & ~E_NOTICE); ini_set('display_errors', 'on'); $phalcon_debug = new Phalcon\Debug(); $phalcon_debug->setUri('http://phalcon.debug.static/www/debug/2.0.0/'); $phalcon_debug->listen(); if (function_exists('opcache_reset')) { opcache_reset(); } //$debug = new \Phalcon\Debug(); //$debug->listen(); } date_default_timezone_set('Asia/Shanghai'); //定义基本常量 define('HTTP_TYPE', !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443 ? "https://" : "http://"); //http or https define('HTTP_HOST', HTTP_TYPE . $_SERVER['HTTP_HOST']); //http(s)://www.xxx.com define('FRONTEND_PATH', '/Frontend'); //为了适应原TP框架分离出来的目录