<?php
date_default_timezone_set('Europe/Moscow');
ini_set('display_errors', true);
error_reporting(E_ALL);
set_error_handler("errorsLog");

function errorsLog($errno, $errmsg, $file, $line)
{
    if($fp=fopen('./tmp/logs/errors.log', 'a+'))
    {
        fwrite($fp, date("r")." | errno: $errno | error: $errmsg | file: $file | line: $line\n");
        fclose($fp);
    }
}
define('ACCESS_CONTROL', true);
define("ROOT_PATH", realpath(dirname(__FILE__).'/../'));
define("APP_PATH", ROOT_PATH.'/app');
define("VIEWS_PATH", APP_PATH.'/views');