42 lines
1.1 KiB
PHP
42 lines
1.1 KiB
PHP
<?php
|
|
/*
|
|
* Flashii Sakura Backend
|
|
* (c)Flashwave/Flashii Media 2013-2015 <http://flash.moe>
|
|
*/
|
|
|
|
// Start output buffering
|
|
ob_start();
|
|
|
|
// Define Sakura version
|
|
define('SAKURA_VERSION', '20150221');
|
|
|
|
// Define Sakura Path
|
|
define('ROOT_DIRECTORY', str_replace('_sakura', '', dirname(__FILE__)));
|
|
|
|
// Error Reporting: 0 for production and -1 for testing
|
|
error_reporting(-1);
|
|
|
|
// Include Configuration
|
|
require_once ROOT_DIRECTORY .'config/config.php';
|
|
|
|
// Include libraries
|
|
require_once ROOT_DIRECTORY .'vendor/autoload.php';
|
|
require_once ROOT_DIRECTORY .'components/Main.php';
|
|
require_once ROOT_DIRECTORY .'components/Hashing.php';
|
|
require_once ROOT_DIRECTORY .'components/Configuration.php';
|
|
|
|
// Generate path to database driver
|
|
$_DBNGNPATH = ROOT_DIRECTORY .'components/database/' . $fiiConf['db']['driver'] . '.php';
|
|
|
|
// Include database driver
|
|
if(file_exists($_DBNGNPATH))
|
|
require_once $_DBNGNPATH;
|
|
else
|
|
die('<h1>Failed to load database driver.</h1>');
|
|
|
|
|
|
// Set Error handler
|
|
set_error_handler(array('Flashii\Flashii', 'ErrorHandler'));
|
|
|
|
// Initialise Flashii Class
|
|
$flashii = new Flashii\Flashii($fiiConf);
|