2020-03-10 00:04:17 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
if (defined('APP_VERSION'))
|
|
|
|
{
|
|
|
|
$aRequirements = array(
|
2020-03-12 02:36:43 +08:00
|
|
|
'cURL' => extension_loaded('curl'),
|
|
|
|
'mbstring' => extension_loaded('mbstring'),
|
|
|
|
'Zlib' => extension_loaded('zlib'),
|
|
|
|
// enabled by default:
|
2020-03-10 00:04:17 +08:00
|
|
|
'json' => function_exists('json_decode'),
|
|
|
|
'libxml' => function_exists('libxml_use_internal_errors'),
|
2020-03-12 02:36:43 +08:00
|
|
|
'dom' => class_exists('DOMDocument')
|
2020-03-10 00:04:17 +08:00
|
|
|
);
|
|
|
|
|
|
|
|
if (version_compare(PHP_VERSION, '7.3.0', '<'))
|
|
|
|
{
|
|
|
|
echo '<p style="color: red">';
|
|
|
|
echo '[301] Your PHP version ('.PHP_VERSION.') is lower than the minimal required 7.3.0!';
|
|
|
|
echo '</p>';
|
|
|
|
exit(301);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (in_array(false, $aRequirements))
|
|
|
|
{
|
|
|
|
echo '<p>';
|
|
|
|
echo '[302] The following PHP extensions are not available in your PHP configuration!';
|
|
|
|
echo '</p>';
|
|
|
|
|
|
|
|
echo '<ul>';
|
|
|
|
foreach ($aRequirements as $sKey => $bValue)
|
|
|
|
{
|
|
|
|
if (!$bValue)
|
|
|
|
{
|
|
|
|
echo '<li>'.$sKey.'</li>';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
echo '</ul>';
|
|
|
|
|
|
|
|
exit(302);
|
|
|
|
}
|
|
|
|
}
|