forked from k0a1a/hotglue2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
34 lines (29 loc) · 901 Bytes
/
index.php
File metadata and controls
34 lines (29 loc) · 901 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
29
30
31
32
33
34
<?php
/*
* index.php
* Main HTTP request handler
*
* Copyright Gottfried Haider, Danja Vasiliev 2010.
* This source code is licensed under the GNU General Public License.
* See the file COPYING for more details.
*/
require 'vendor/autoload.php';
@require_once('config.inc.php');
require_once('log.inc.php');
log_msg('info', '--- request ---');
require_once('controller.inc.php');
require_once('modules.inc.php');
// Check if the script is being run via CLI
if (PHP_SAPI === 'cli') {
log_msg('info', 'Script is being run via CLI');
// Get arguments from $argv
$args = $argv;
array_shift($args);
$args = [$args];
} else {
log_msg('info', 'Script is being run via web server');
$args = parse_query_string();
}
log_msg('info', 'index: query arguments ' . var_dump_inl($args));
//log_msg('debug', 'index: base url is ' . quot(base_url()));
invoke_controller($args);