Файловый менеджер - Редактировать - /var/www/readzy/core/init.php
Назад
<?php /** * Readzy Server Core * * @author Daniel Sturrock * @copyright 2019 App Studio Pty Ltd */ //Include config file require_once('config.php'); //Show all errors if($_ENV['errors']){ error_reporting(E_ALL); ini_set('display_errors', '1'); } ob_start(); //Set the server timezone date_default_timezone_set($_ENV['timezone']); if($_ENV['https'] && isset($_SERVER['HTTP_HOST'])){ if(isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'){ $_SERVER['SERVER_PORT'] = 443; }else{ header("HTTP/1.1 301 Moved Permanently"); header('Location: https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); die(); } } //Autoload Core Files spl_autoload_register(function ($class) { $prefix = 'readzy\\'; $base_dir = __DIR__ . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR; // Check if the class being loaded is OE's $len = strlen($prefix); if (strncmp($prefix, $class, $len) !== 0) { return; } // Get the relative class name $relative_class = substr($class, $len); // Replace the namespace prefix with the base directory, replace namespace // separators with directory separators and append with .php $file = $base_dir . str_replace('\\', DIRECTORY_SEPARATOR, $relative_class) . '.php'; // If the file exists, require it if (is_file($file)) { require_once $file; }else{ bugsnag('Could not include core file: '.$file); } }); ?>
| ver. 1.4 |
Github
|
.
| PHP 7.0.33-0ubuntu0.16.04.16 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка