Exemple #1
0
    define("DEBUG_MODE", true);
    //on the cloud change this with false
    ini_set('display_errors', 1);
    ini_set('error_reporting', E_ALL);
    error_reporting(E_ALL);
}
//--------------- 2. INCLUDES -------------------------------------------------------
file_exists(APP_PATH . '/application/util_func.php') ? include_once APP_PATH . "/application/util_func.php" : "";
file_exists(APP_PATH . '/library/Core.php') ? include_once APP_PATH . "/library/Core.php" : "";
if (file_exists(APP_PATH . '/library/recaptchalib.php')) {
    require_once APP_PATH . '/library/recaptchalib.php';
}
//------------ 3 INI CLASSES -------------------------------------------------------
Core::initialize();
Sessions::init();
CSRF::init();
Hash::init();
//----------------------4 ERROR REPORTING ---------------------------------------------
if ($local == false) {
    //set_error_handler('Errors::my_error_handler_prod');
    set_error_handler('Errors::my_error_handler', E_ALL);
    if (isset($_SESSION['system_error_message'])) {
        error_log($_SESSION['system_error_message'] . "\n", 3, "/home/remb4372/public_html/traian4/new-pdo/error.log");
    }
} else {
    set_error_handler('Errors::my_error_handler', E_ALL);
    if (isset($_SESSION['system_error_message'])) {
        error_log($_SESSION['system_error_message'] . "\n", 3, "C:\\Users\\victor92\\OneDrive\\htdocs\\traian4\\new-pdo\\error.log");
    }
}
// ------------ 5 CONFIG KEYS, ENCRYPTION FROM INI FILE ----------------------------