-
Notifications
You must be signed in to change notification settings - Fork 2
/
drm
53 lines (40 loc) · 1.22 KB
/
drm
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
48
49
50
51
52
53
<?php
/**
* PHP DRM
*/
use packages\package;
/**
* Refuse to run oil when called from php-cgi !
*/
if (substr(php_sapi_name(), 0, 3) == 'cgi') {
die("The use of drm is not supported when running php-cgi. drm needs php-cli to function!\n\n");
}
require_once 'system/config/config.php';
/*
* SYSTEM DIRECTORY NAME
*-
* This variable must contain the name of your "system" directory.
* Set the path if it is not in the same directory as this file.
*/
$system_folder = 'system';
/**
* Website document root
*/
define('ROOT', dirname(__DIR__) . DIRECTORY_SEPARATOR);
/**
* Path to the application directory.
*/
define('DRM', ROOT . $system_folder . DIRECTORY_SEPARATOR);
/**
* Path to the default class directory.
*/
define('CLASSES', ROOT . $system_folder . DIRECTORY_SEPARATOR . 'core/classes');
/**
* The path to the framework core.
*/
define('CORE', ROOT . $system_folder . DIRECTORY_SEPARATOR . 'core');
require_once 'vendor/autoload.php';
// Get the start time and memory for use later
defined('DRM_START_TIME') or define('DRM_START_TIME', microtime(true));
defined('DRM_START_MEM') or define('DRM_START_MEM', memory_get_usage());
package::load('cmd', 'command');