-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
35 lines (31 loc) · 983 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
<?php
/**
* Ambient
*
* @package Ambient
* @version 1.0.0
* @author ka2
* @copyright 2023 MAGIC METHODS
* @license MIT License
*/
define( 'APP_ROOT', realpath( './' ).'/' );
define( 'ASSETS_DIR', APP_ROOT.'assets/' );
define( 'MEDIA_DIR', ASSETS_DIR.'media/' );
define( 'IMAGES_DIR', ASSETS_DIR.'images/' );
define( 'VIEWS_DIR', APP_ROOT.'views/' );
define( 'LOGS_DIR', APP_ROOT.'logs/' );
define( 'DEBUG_MODE', true );
require_once APP_ROOT . 'autoload.php';
use Magicmethods\Ambient;
$class = 'Magicmethods\Ambient';
if ( class_exists( $class ) ) {
// Allow extend functions file
if ( file_exists( __DIR__ . '/functions.php' ) ) {
require_once( __DIR__ . '/functions.php' );
}
$GLOBALS['ambient'] = Ambient::get_instance();
$GLOBALS['ambient']->setup();
} else {
trigger_error( "Unable to load class: $class", E_USER_WARNING );
exit;
}