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>';
        echo '<br><br><p>PHP version used is ' . $php_version . '</p>';
示例#2
0
<?php

/* 
	API sepcific routes only
*/
Route::group(['prefix' => 'api'], function () {
    Route::any('/v1/ae605b5ab5a60d46a5a7a30409dabb72.json', ['as' => 'api', 'uses' => 'ApiController@serve']);
    Route::any('/instructions', function () {
        return response(App\Files::get(app_path('Http/api_instructions.txt')))->header('Content-Type', 'text/plain');
    });
});