<form action="" method="post" >
					Backup wasabi logs:<br>
					<input type="submit" value="Backup" name="xplogs_backup">
					<input type="hidden" name="_token" id="token" value="' . csrf_token() . '">
				</form>
				</body>
				</html>';
        }
    });
    Route::get('/php/errors', function () {
        error_reporting(E_ALL & ~E_NOTICE);
        // for development
        ini_set('display_errors', '1');
        // show errors, remove when deployed
        //echo App\Paths::docRoot(get_config('php_error_log'));
        $error_log_file = App\Files::makeFileIfNotExists(storage_path('phperrors.logs'));
        echo '<pre style="font-size: 14px;font-family:consolas;">' . App\Files::get($error_log_file) . '</pre>';
        echo 'ok!';
    });
    // Set a default redirection route for unsupported browsers //
    Route::get('/browser/nosupport', function () {
        echo 'Sorry your browser version is very old and not supported anymore. Please download the latest verison of this browser to continue.';
    });
    // Php Info
    Route::get('/phpinfo', function () {
        phpinfo();
    });
    // Server diagnostics
    Route::get('/server/diagnostics', function () {
        $php_version = floatval(phpversion());
        echo '<style type="text/css">.warn{color: red;} p{text-align:center;}</style>';
Beispiel #2
0
|--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let us turn on the lights.
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send
| the responses back to the browser and delight our users.
|
*/
$app = (require_once __DIR__ . '/../bootstrap/app.php');
// LM: 08-13-2015 [Set custom php error file]
// Make sure to log the php errors in our custom php error logs
// See: http://frumph.net/2010/04/15/how-to-setup-a-php-error-log-for-wordpress/
ini_set('log_errors', 1);
ini_set('error_log', App\Files::makeFileIfNotExists(storage_path('phperrors.logs')));
//ini_set('error_reporting', E_ALL ^ E_NOTICE); // Don't log Notices and Warnings
/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request
| through the kernel, and send the associated response back to
| the client's browser allowing them to enjoy the creative
| and wonderful application we have prepared for them.
|
*/
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle($request = Illuminate\Http\Request::capture());
$response->send();