-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
executable file
·38 lines (33 loc) · 944 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
36
37
38
<?php
/**
* This file is part of the Carrot framework.
*
* Copyright (c) 2011 Ricky Christie <[email protected]>.
*
* Licensed under the MIT License.
*
*/
/**
* Load the configuration file.
*
* This file (index.php) is the only file that must stay in the
* site's root. Other files can be moved, provided you write the
* paths correctly in config.php and this file. The name of this
* file (index.php) must not change, otherwise base path guessing
* will not work.
*
*/
$config = require __DIR__ . DIRECTORY_SEPARATOR .
'config' . DIRECTORY_SEPARATOR .
'config.php';
/**
* Require the file that contains Carrot\Core\Application class,
* instantiate it and dispatch the request. Send the response
* back to the client.
*
*/
require $config['files']['application'];
$app = new Carrot\Core\Application($config);
$app->initialize();
$response = $app->run();
$response->send();