Be able to serve the website simply with the phar archive

This commit is contained in:
Stéphane Goetz 2015-07-19 12:40:49 +02:00
bovenliggende 932fab5a84
commit a7962839d0
2 gewijzigde bestanden met toevoegingen van 8 en 1 verwijderingen

BIN
daux.phar

Binair bestand niet weergegeven.

Bestand weergeven

@ -75,7 +75,14 @@ if (php_sapi_name() === 'cli-server') {
$_SERVER['SCRIPT_NAME'] = '/index.php';
}
require_once("vendor/autoload.php");
if (file_exists('vendor/autoload.php')) {
require_once('vendor/autoload.php');
} elseif (file_exists('daux.phar')) {
define('PHAR_DIR', __DIR__);
require_once("phar://" . __DIR__ . "/daux.phar/vendor/autoload.php");
} else {
throw new Exception("Impossible to load Daux, missing vendor and phar");
}
\Todaymade\Daux\Daux::initConstants();