error logging
This commit is contained in:
parent
5636b6daf5
commit
849d5d3ac9
1 changed files with 67 additions and 65 deletions
|
@ -7,33 +7,35 @@
|
|||
// Declare namespace
|
||||
namespace Sakura;
|
||||
|
||||
// Define Sakura version
|
||||
define('SAKURA_VERSION', '20150330');
|
||||
|
||||
// Define Sakura Path
|
||||
define('ROOT', str_replace('_sakura', '', dirname(__FILE__)));
|
||||
|
||||
// Error Reporting: 0 for production and -1 for testing
|
||||
error_reporting(-1);
|
||||
ini_set('log_errors', 1);
|
||||
ini_set('error_log', ROOT .'errors.log');
|
||||
|
||||
// Start output buffering with gzip and no gzip fallback
|
||||
if(!ob_start('ob_gzhandler'))
|
||||
ob_start();
|
||||
|
||||
// Define Sakura version
|
||||
define('SAKURA_VERSION', '20150330');
|
||||
|
||||
// Define Sakura Path
|
||||
define('ROOT_DIRECTORY', str_replace('_sakura', '', dirname(__FILE__)));
|
||||
|
||||
// Include Configuration
|
||||
require_once ROOT_DIRECTORY .'_sakura/config/config.php';
|
||||
require_once ROOT .'_sakura/config/config.php';
|
||||
|
||||
// Include libraries
|
||||
require_once ROOT_DIRECTORY .'_sakura/vendor/autoload.php';
|
||||
require_once ROOT_DIRECTORY .'_sakura/components/Main.php';
|
||||
require_once ROOT_DIRECTORY .'_sakura/components/Hashing.php';
|
||||
require_once ROOT_DIRECTORY .'_sakura/components/Configuration.php';
|
||||
require_once ROOT_DIRECTORY .'_sakura/components/Templates.php';
|
||||
require_once ROOT_DIRECTORY .'_sakura/components/Sessions.php';
|
||||
require_once ROOT_DIRECTORY .'_sakura/components/Users.php';
|
||||
require_once ROOT .'_sakura/vendor/autoload.php';
|
||||
require_once ROOT .'_sakura/components/Main.php';
|
||||
require_once ROOT .'_sakura/components/Hashing.php';
|
||||
require_once ROOT .'_sakura/components/Configuration.php';
|
||||
require_once ROOT .'_sakura/components/Templates.php';
|
||||
require_once ROOT .'_sakura/components/Sessions.php';
|
||||
require_once ROOT .'_sakura/components/Users.php';
|
||||
|
||||
// Generate path to database driver
|
||||
$_DBNGNPATH = ROOT_DIRECTORY .'_sakura/components/database/'. $sakuraConf['db']['driver'] .'.php';
|
||||
$_DBNGNPATH = ROOT .'_sakura/components/database/'. $sakuraConf['db']['driver'] .'.php';
|
||||
|
||||
// Include database driver
|
||||
if(file_exists($_DBNGNPATH))
|
||||
|
|
Reference in a new issue