Пример #1
0
if (floatval(phpversion()) < 5.2) {
    die('Please upgrade to PHP 5.2 or higher');
}
// include kirby
require_once $rootKirby . '/lib/kirby.php';
// set the root
c::set('root', $root);
c::set('root.kirby', $rootKirby);
c::set('root.site', $rootSite);
c::set('root.content', $rootContent);
require_once $rootKirby . '/lib/load.php';
// load the rest of the system
load::lib();
load::config();
load::parsers();
load::plugins();
// check for an exisiting content dir
if (!is_dir(c::get('root.content'))) {
    die('The Kirby content directory could not be found');
}
// check for an exisiting site dir
if (!is_dir(c::get('root.site'))) {
    die('The Kirby site directory could not be found');
}
// set the timezone to make sure we
// avoid errors in php 5.3
@date_default_timezone_set(c::get('timezone'));
// switch on errors
if (c::get('debug')) {
    error_reporting(E_ALL);
    ini_set('display_errors', 1);