-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
28 lines (22 loc) · 839 Bytes
/
index.php
File metadata and controls
28 lines (22 loc) · 839 Bytes
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
<?php
// The Composer auto-loader (official way to load Composer contents) to load external stuff automatically
require_once __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/conf/config.php';
use Tracy\Debugger;
//Tracy is able to show Debug bar and Bluescreens for AJAX and redirected requests.
//You just have to start session before Tracy
session_start() || error_log('session_start failed');
if (!isset($debugIpArray)) {
$debugIpArray = [];
}
$developmentEnvironment = (
in_array(
$_SERVER['REMOTE_ADDR'],
array('::1', '127.0.0.1')
) || in_array($_SERVER['REMOTE_ADDR'], $debugIpArray)
);
Debugger::enable($developmentEnvironment ? Debugger::DEVELOPMENT : Debugger::PRODUCTION, __DIR__ . '/log');
echo "Hello world!";
if ($developmentEnvironment) {
echo "<br>I am PHP " . PHP_VERSION;
}