source of /index.php<?php /* * Copyright (C) 2017 Karmabunny Pty Ltd. * * This file is a part of SproutCMS. * * SproutCMS is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Foundation, either * version 2 of the License, or (at your option) any later version. * * For more information, visit <http://getsproutcms.com>. */ exit('PHP 5.5 or newer required'); } // This file contains a class with a methods for determining the details of // the very initial environment, prior to the rest of the system coming up require __DIR__ . '/config/_bootstrap_config.php'; // Define the website environment status. This determines how much debugging // information is provided when errors occur, among other things. require __DIR__ . '/config/dev_hosts.php'; define('IN_PRODUCTION', false); } } } define('IN_PRODUCTION', true); } // All errors need to be fixed before code goes into production if (IN_PRODUCTION) { } else { } // The timezone is explicitly set to avoid warnings from bad server configuration if (!empty(BootstrapConfig ::TIMEZONE)) { } /** * Occasionally a server is offline - it does not have internet access, but it * is still available through the local network. In this case, the following * flag should be changed to FALSE. This will disable external services such * as remote login. */ define('SERVER_ONLINE', true); /** * Turning off display_errors will effectively disable Kohana error display * and logging. You can turn off Kohana errors in sprout/config/config.php */ define('APPPATH', DOCROOT . 'sprout' . DIRECTORY_SEPARATOR); // If behind a reverse proxy, make the server think it is the proxy server if (!empty($_SERVER['HTTP_X_FORWARDED_SERVER'])) { $_SERVER['SERVER_NAME'] = $_SERVER['HTTP_X_FORWARDED_SERVER']; } // CLI-server for development. if (!IN_PRODUCTION and PHP_SAPI === 'cli-server') { $ok = require APPPATH . 'cli_bootstrap.php'; if ($ok !== null) return $ok; } // Load the installation tests require DOCROOT . 'install.php'; } else { // Initialize Kohana require APPPATH . 'core/Bootstrap.php'; }
|