venom/public/index.php
VersusTune 7ba4e3e0a6 - added error_reporting if devMode
- added TestController.php
- added temp function to load controllers (should load later via seo urls)
- added baseTemplate for default look and feel
- removed adding file extension -> always need to be .php!
2020-04-03 13:19:26 +02:00

33 lines
820 B
PHP
Executable file

<?php
use Venom\Config;
use Venom\Venom;
require_once '../vendor/autoload.php';
if (!file_exists('../config.inc.php')) {
copy('../config.base.php', '../config.inc.php');
echo 'Please change Config @ config.inc.php';
exit();
}
if (!file_exists('../module.inc.php')) {
copy('../module.base.php', '../module.inc.php');
echo 'Please change Modules @ module.inc.php';
exit();
}
require_once '../config.inc.php';
require_once '../module.inc.php';
$config = Config::getInstance();
if ($config->isMaintenance()) {
echo 'Currently not available';
exit;
}
//if devMode is on show all errors!
if ($config->isDevMode()) {
error_reporting(E_ALL);
ini_set('error_reporting', E_ALL);
}
$venom = new Venom();
$venom->initModules($modules);
$venom->initControllers($controllers);
$venom->run();