2016-11-28 21:52:15 -08:00

28 lines
620 B
PHP

<?php
/**
* This makes our life easier when dealing with paths. Everything is relative
* to the application root now.
*/
chdir(dirname(__DIR__));
$autoloadPaths = array(
'vendor/autoload.php',
'../../autoload.php',
);
$foundVendorAutoload = false;
foreach ($autoloadPaths as $path) {
if (file_exists($path)) {
require $path;
$foundVendorAutoload = true;
break;
}
}
if (!$foundVendorAutoload) {
throw new Exception('Could not find autoload path in any of the searched locations');
}
ini_set('memory_limit', '-1');
date_default_timezone_set(date_default_timezone_get());