forked from livestreet/livestreet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
43 lines (36 loc) · 1.41 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/*-------------------------------------------------------
*
* LiveStreet Engine Social Networking
* Copyright © 2008 Mzhelskiy Maxim
*
*--------------------------------------------------------
*
* Official site: www.livestreet.ru
* Contact e-mail: [email protected]
*
* GNU General Public License, version 2:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
---------------------------------------------------------
*/
error_reporting(E_ALL);
ini_set('display_errors', 1);
header('Content-Type: text/html; charset=utf-8');
header('X-Powered-By: LiveStreet CMS');
set_include_path(get_include_path().PATH_SEPARATOR.dirname(__FILE__));
chdir(dirname(__FILE__));
// Проверка на наличие директории install
if (is_dir (dirname(__FILE__) . DIRECTORY_SEPARATOR . 'install') and (!isset ($_SERVER ['HTTP_APP_ENV']) or $_SERVER ['HTTP_APP_ENV'] != 'test')) {
header ("Location: http://" . $_SERVER ['HTTP_HOST'] . "/install");
exit ();
}
// Получаем объект конфигурации
require_once("./config/loader.php");
require_once(Config::Get('path.root.engine')."/classes/Engine.class.php");
$oProfiler=ProfilerSimple::getInstance(Config::Get('path.root.server').'/logs/'.Config::Get('sys.logs.profiler_file'),Config::Get('sys.logs.profiler'));
$iTimeId=$oProfiler->Start('full_time');
$oRouter=Router::getInstance();
$oRouter->Exec();
$oProfiler->Stop($iTimeId);
?>