index.php 728 B

1234567891011121314151617181920212223242526
  1. <?php
  2. use Mall\Framework\Factory;
  3. use Mall\Framework\Core\Config;
  4. header("Access-Control-Allow-Origin: *");
  5. header("Access-Control-Allow-Methods:*");
  6. header("Access-Control-Allow-Headers:*");
  7. require_once __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'Mall' . DIRECTORY_SEPARATOR . 'Bootstrap.php';
  8. if(function_exists("opcache_reset")){
  9. opcache_reset();
  10. }
  11. //打印错误
  12. //error_reporting(E_ALL);
  13. //ini_set('display_errors', true);
  14. bcscale(4);
  15. // 加载项目全局变量
  16. require_once dirname(dirname(dirname(__FILE__))) .DS. '.ENV.php';
  17. Config::load(PROJECT_PATH . DS . 'Config' . DS . 'Config.php');
  18. // 加载框架入口文件
  19. Factory::request()->dispatch(false, true);