fix parse error at index.php under PHP 5.3

This commit is contained in:
printempw 2016-12-17 20:48:13 +08:00
parent 55f8c87b92
commit 372be47ac8
4 changed files with 12 additions and 12 deletions

View File

@ -305,11 +305,6 @@ if (! function_exists('runtime_check')) {
function runtime_check(array $requirements) function runtime_check(array $requirements)
{ {
// check php version
if (version_compare(PHP_VERSION, $requirements['php'], '<')) {
exit("[Error] Blessing Skin Server needs PHP version >= {$requirements['php']}, you are now using ".PHP_VERSION);
}
foreach ($requirements['extensions'] as $extension) { foreach ($requirements['extensions'] as $extension) {
if (!extension_loaded($extension)) { if (!extension_loaded($extension)) {
exit("[Error] You have not installed the $extension extension"); exit("[Error] You have not installed the $extension extension");

View File

@ -2,8 +2,6 @@
define('LARAVEL_START', microtime(true)); define('LARAVEL_START', microtime(true));
ini_set('display_errors', 'on');
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Register The Composer Auto Loader | Register The Composer Auto Loader

View File

@ -2,7 +2,7 @@
* @Author: prpr * @Author: prpr
* @Date: 2016-07-21 13:38:26 * @Date: 2016-07-21 13:38:26
* @Last Modified by: printempw * @Last Modified by: printempw
* @Last Modified time: 2016-12-10 20:22:13 * @Last Modified time: 2016-12-17 20:36:36
*/ */
var gulp = require('gulp'), var gulp = require('gulp'),
@ -100,6 +100,7 @@ gulp.task('zip', function() {
del([ del([
'storage/logs/*', 'storage/logs/*',
'storage/debugbar/*', 'storage/debugbar/*',
'storage/update_cache/*',
'storage/yaml-translation/*', 'storage/yaml-translation/*',
'storage/framework/cache/*', 'storage/framework/cache/*',
'storage/framework/sessions/*', 'storage/framework/sessions/*',

View File

@ -7,13 +7,19 @@
* @author printempw <h@prinzeugen.net> * @author printempw <h@prinzeugen.net>
*/ */
@ini_set('display_errors', 'on');
// check PHP version
if (version_compare(PHP_VERSION, '5.5.9', '<')) {
exit('[Error] Blessing Skin Server needs PHP version >= 5.5.9, you are now using '.PHP_VERSION);
}
require __DIR__.'/bootstrap/autoload.php'; require __DIR__.'/bootstrap/autoload.php';
// check the runtime environment // check the runtime environment
runtime_check([ runtime_check(array(
'php' => '5.5.9', 'extensions' => array('pdo_mysql', 'openssl', 'gd')
'extensions' => ['pdo_mysql', 'openssl', 'gd'] ));
]);
// handle the request // handle the request
require __DIR__.'/bootstrap/handler.php'; require __DIR__.'/bootstrap/handler.php';