-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.php
More file actions
46 lines (35 loc) · 1.01 KB
/
Copy pathindex.php
File metadata and controls
46 lines (35 loc) · 1.01 KB
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
<?php
use Dotenv\Dotenv;
use App\Services\Health;
try {
// Enable handler
require_once(__DIR__.'/core/handler.php');
// Load Composer Packages
if(!is_file('/vendor/autoload.php')){
require_once(__DIR__ . '/vendor/autoload.php');
}else{
throw new Exception('composer not working');
}
// Load ENV values
if(!is_file('/.env')){
Dotenv::createImmutable(__DIR__)->load();
}else{
throw new Exception('.env file not found');
}
// Require Framework Core
require_once(__DIR__.'/core/core.php');
//$data = config('app.default.language');
//dd($data);
//exit();
// Require Kernel Auto Connector
//require_once(__DIR__.'/app/Kernel.php');
// FOR TESTING
//(new Health())->check_echo_text();
//(new Health())->check_database_connection();
//dd(root_dir());
//view(1);
// Router Controller
require_once __DIR__ . '/routes/web.php';
}catch(Exception $e) {
require_once __DIR__ . '/views/error/handler.php';
}