mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
32 lines
1.2 KiB
PHP
32 lines
1.2 KiB
PHP
<?php
|
|
|
|
// platform_check.php @generated by Composer
|
|
|
|
$issues = array();
|
|
|
|
if (!(PHP_VERSION_ID >= 70205)) {
|
|
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.5". You are running ' . PHP_VERSION . '.';
|
|
}
|
|
|
|
$missingExtensions = array();
|
|
extension_loaded('bcmath') || $missingExtensions[] = 'bcmath';
|
|
extension_loaded('curl') || $missingExtensions[] = 'curl';
|
|
extension_loaded('fileinfo') || $missingExtensions[] = 'fileinfo';
|
|
extension_loaded('gd') || $missingExtensions[] = 'gd';
|
|
extension_loaded('iconv') || $missingExtensions[] = 'iconv';
|
|
extension_loaded('json') || $missingExtensions[] = 'json';
|
|
extension_loaded('libxml') || $missingExtensions[] = 'libxml';
|
|
extension_loaded('mbstring') || $missingExtensions[] = 'mbstring';
|
|
extension_loaded('openssl') || $missingExtensions[] = 'openssl';
|
|
extension_loaded('simplexml') || $missingExtensions[] = 'simplexml';
|
|
extension_loaded('xml') || $missingExtensions[] = 'xml';
|
|
|
|
if ($missingExtensions) {
|
|
$issues[] = 'Your Composer dependencies require the following PHP extensions to be installed: ' . implode(', ', $missingExtensions);
|
|
}
|
|
|
|
if ($issues) {
|
|
echo 'Composer detected issues in your platform:' . "\n\n" . implode("\n", $issues);
|
|
exit(104);
|
|
}
|