We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
index.php
1 parent 2787322 commit 2156f3fCopy full SHA for 2156f3f
1 file changed
public/index.php
@@ -2,12 +2,16 @@
2
3
namespace WebFiori;
4
5
-$DS = DIRECTORY_SEPARATOR;
6
-
7
-require __DIR__.$DS.'..'.$DS.'vendor'.$DS.'autoload.php';
+require __DIR__ . '/../vendor/autoload.php';
8
9
use WebFiori\Framework\App;
10
11
-App::initiate('App', 'public', __DIR__);
12
-App::start();
13
-App::handle();
+// First parameter is the name of the application directory.
+try {
+ App::initiate('App', 'public', __DIR__);
+ App::start();
+ App::handle();
14
+} catch (\Throwable $e) {
15
+ http_response_code(500);
16
+ echo 'Internal Server Error';
17
+}
0 commit comments