Skip to content

Commit 2156f3f

Browse files
committed
chore: Updated index.php
1 parent 2787322 commit 2156f3f

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

public/index.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22

33
namespace WebFiori;
44

5-
$DS = DIRECTORY_SEPARATOR;
6-
7-
require __DIR__.$DS.'..'.$DS.'vendor'.$DS.'autoload.php';
5+
require __DIR__ . '/../vendor/autoload.php';
86

97
use WebFiori\Framework\App;
108

11-
App::initiate('App', 'public', __DIR__);
12-
App::start();
13-
App::handle();
9+
// First parameter is the name of the application directory.
10+
try {
11+
App::initiate('App', 'public', __DIR__);
12+
App::start();
13+
App::handle();
14+
} catch (\Throwable $e) {
15+
http_response_code(500);
16+
echo 'Internal Server Error';
17+
}

0 commit comments

Comments
 (0)