-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
50 lines (32 loc) · 923 Bytes
/
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
44
45
46
47
<?php
if (substr($_SERVER['DOCUMENT_ROOT'], -1) != '/')
{
$_SERVER['DOCUMENT_ROOT'] = $_SERVER['DOCUMENT_ROOT'].'/';
}
define("PROTECTED_PATH", $_SERVER["DOCUMENT_ROOT"] . "protected/");
define("MODULES_PATH", $_SERVER["DOCUMENT_ROOT"] . "protected/modules/");
define("LIBRARY_PATH", PROTECTED_PATH . "libs/");
$yii = LIBRARY_PATH . 'yii/yii.php';
defined('YII_DEBUG') || define('YII_DEBUG',true);
defined('YII_TRACE_LEVEL') || define('YII_TRACE_LEVEL',3);
ini_set("display_errors", 1);
error_reporting(E_ALL);
date_default_timezone_set('Europe/Moscow');
require_once($yii);
$session = new CHttpSession;
$session->open();
$config = $_SERVER['DOCUMENT_ROOT'] . 'protected/config/development.php';
Yii::createWebApplication($config)->run();
function p($data)
{
echo "<pre>";
print_r($data);
echo "</pre>";
}
function v($data)
{
echo "<pre>";
var_dump($data);
echo "</pre>";
}
?>