mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-06-05 09:23:40 -04:00
Refactor PHP. Remove almost all defines.
This commit is contained in:
parent
7bcb52214b
commit
c18b09c658
16 changed files with 372 additions and 295 deletions
|
@ -1,8 +1,15 @@
|
|||
<?php
|
||||
|
||||
$basepath = preg_replace("#[\\\\/]+#", "/", dirname(__FILE__));
|
||||
define('MIN_PHP_VERSION', '5.4.0');
|
||||
|
||||
require_once($basepath . "/inc/version-check.php");
|
||||
require_once($basepath . "/inc/class-bootstrap.php");
|
||||
if (version_compare(PHP_VERSION, MIN_PHP_VERSION) < 0) {
|
||||
header('Content-type: application/json;charset=utf-8');
|
||||
echo '{"err":"ERR_PHP","msg":"PHP ' . MIN_PHP_VERSION . '+ required","ver":"' . PHP_VERSION . '"}';
|
||||
exit;
|
||||
}
|
||||
|
||||
(new Bootstrap($basepath))->run();
|
||||
$basepath = preg_replace('#[\\\\/]+#', '/', dirname(__FILE__));
|
||||
require_once($basepath . '/inc/class-bootstrap.php');
|
||||
|
||||
$bootstrap = new Bootstrap($basepath);
|
||||
$bootstrap->run();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue