php -S {$_SERVER['SERVER_NAME']}:{$_SERVER['SERVER_PORT']} system/router.php"); } } // Ensure vendor libraries exist $autoload = __DIR__ . '/vendor/autoload.php'; if (!is_file($autoload)) { die('Please run: bin/grav install'); } // Register the auto-loader. $loader = require $autoload; // Set timezone to default, falls back to system if php.ini not set date_default_timezone_set(@date_default_timezone_get()); // Set internal encoding. @ini_set('default_charset', 'UTF-8'); mb_internal_encoding('UTF-8'); use Grav\Common\Grav; use RocketTheme\Toolbox\Event\Event; // Get the Grav instance $grav = Grav::instance(array('loader' => $loader)); // Process the page try { $grav->process(); } catch (\Error|\Exception $e) { $grav->fireEvent('onFatalException', new Event(array('exception' => $e))); throw $e; }