mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2025-03-07 15:16:40 +08:00
separate codes with namespaced class names from index.php
This commit is contained in:
parent
4f30cc6eb7
commit
c9a3c0549b
@ -28,7 +28,8 @@ Blessing Skin Server has a few system requirements.
|
||||
1. Web server which supports URL rewriting
|
||||
2. **PHP version >= 5.5.9**
|
||||
3. GD PHP Extension
|
||||
4. Writeable directory
|
||||
4. OpenSSL PHP Extension
|
||||
5. Writeable directory
|
||||
|
||||
Quick Start Install
|
||||
-----------
|
||||
|
@ -1,5 +1,18 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Handle The Request
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Blessing Skin Server separated these codes here to ensure that
|
||||
| runtime check will be executed correctly, since namespaced class names
|
||||
| will be regarded as parse error under PHP 5.3.
|
||||
|
|
||||
*/
|
||||
|
||||
require __DIR__.'/autoload.php';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Create The Application
|
||||
@ -41,15 +54,12 @@ $app->singleton(
|
||||
App\Exceptions\Handler::class
|
||||
);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Return The Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This script returns the application instance. The instance is given to
|
||||
| the calling script so we can separate the building of the instances
|
||||
| from the actual running of the application and sending responses.
|
||||
|
|
||||
*/
|
||||
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
|
||||
|
||||
return $app;
|
||||
$response = $kernel->handle(
|
||||
$request = Illuminate\Http\Request::capture()
|
||||
);
|
||||
|
||||
$response->send();
|
||||
|
||||
$kernel->terminate($request, $response);
|
15
index.php
15
index.php
@ -20,16 +20,5 @@ if (!function_exists('openssl_encrypt')) {
|
||||
exit('[Error] You have not installed the OpenSSL extension');
|
||||
}
|
||||
|
||||
require __DIR__.'/bootstrap/autoload.php';
|
||||
|
||||
$app = require_once __DIR__.'/bootstrap/app.php';
|
||||
|
||||
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
|
||||
|
||||
$response = $kernel->handle(
|
||||
$request = Illuminate\Http\Request::capture()
|
||||
);
|
||||
|
||||
$response->send();
|
||||
|
||||
$kernel->terminate($request, $response);
|
||||
// handle the request
|
||||
require __DIR__.'/bootstrap/handler.php';
|
||||
|
Loading…
Reference in New Issue
Block a user