forked from EasyEngine/easyengine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit-ee.php
More file actions
27 lines (22 loc) · 903 Bytes
/
init-ee.php
File metadata and controls
27 lines (22 loc) · 903 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
<?php
// Can be used by plugins/themes to check if EE is running or not
define( 'EE', true );
define( 'EE_VERSION', trim( file_get_contents( EE_ROOT . '/VERSION' ) ) );
define( 'EE_START_MICROTIME', microtime( true ) );
define( 'IS_DARWIN', 'Darwin' === php_uname( 's' ) );
if ( IS_DARWIN ) {
define( 'EE_ROOT_DIR', rtrim( getenv( 'HOME' ), '/\\' ) . '/easyengine' );
} else {
define( 'EE_ROOT_DIR', '/opt/easyengine' );
}
define( 'EE_BACKUP_DIR', EE_ROOT_DIR . '/.backup' );
define( 'EE_SERVICE_DIR', EE_ROOT_DIR . '/services' );
if ( file_exists( EE_ROOT . '/vendor/autoload.php' ) ) {
define( 'EE_VENDOR_DIR', EE_ROOT . '/vendor' );
} elseif ( file_exists( dirname( dirname( EE_ROOT ) ) . '/autoload.php' ) ) {
define( 'EE_VENDOR_DIR', dirname( dirname( EE_ROOT ) ) );
} else {
define( 'EE_VENDOR_DIR', EE_ROOT . '/vendor' );
}
require_once EE_ROOT . '/php/bootstrap.php';
\EE\bootstrap();