akaunting/bootstrap/autoload.php

34 lines
809 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
2021-01-16 14:09:58 +03:00
define('AKAUNTING_PHP', '7.3.0');
2020-06-28 00:24:03 +03:00
// Check PHP version
if (version_compare(PHP_VERSION, AKAUNTING_PHP, '<')) {
2020-08-25 16:15:51 +03:00
$message = 'Error: Ask your hosting provider to use PHP ' . AKAUNTING_PHP . ' or higher for HTTP, CLI, and php command.' . PHP_EOL . PHP_EOL . 'Current PHP version: ' . PHP_VERSION . PHP_EOL;
2020-08-24 17:45:29 +03:00
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
}