akaunting/bootstrap/autoload.php

34 lines
800 B
PHP
Raw Normal View History

2017-09-14 22:21:00 +03:00
<?php
2020-06-28 00:24:03 +03:00
// Define minimum supported PHP version
define('AKAUNTING_PHP', '7.2.5');
// Check PHP version
if (version_compare(PHP_VERSION, AKAUNTING_PHP, '<')) {
2020-08-24 17:45:29 +03:00
$message = 'Error: Ask your hosting provider to use PHP ' . AKAUNTING_PHP . ' or higher for both HTTP and CLI.' . PHP_EOL . PHP_EOL . 'Current PHP version: ' . PHP_VERSION . PHP_EOL;
if (defined('STDOUT')) {
fwrite(STDOUT, $message);
} else {
echo($message);
}
die(1);
2020-06-28 00:24:03 +03:00
}
2017-09-14 22:21:00 +03:00
2020-06-28 00:24:03 +03:00
define('LARAVEL_START', microtime(true));
2017-09-14 22:21:00 +03:00
2020-06-28 00:24:03 +03:00
// Load composer for core
require __DIR__ . '/../vendor/autoload.php';
2017-12-02 13:22:10 +03:00
// Load composer for modules
foreach (glob(__DIR__ . '/../modules/*') as $folder) {
$autoload = $folder . '/vendor/autoload.php';
if (!is_file($autoload)) {
continue;
}
require $autoload;
2020-06-28 00:24:03 +03:00
}