adding example apps, fixing powerup issues
[feisty_meow.git] / production / example_apps / shared_calendar / webroot / index.php
1 <?php
2 /**
3  * The Front Controller for handling every request
4  *
5  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
6  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
7  *
8  * Licensed under The MIT License
9  * For full copyright and license information, please see the LICENSE.txt
10  * Redistributions of files must retain the above copyright notice.
11  *
12  * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
13  * @link          http://cakephp.org CakePHP(tm) Project
14  * @since         0.2.9
15  * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
16  */
17 // for built-in server
18 if (php_sapi_name() === 'cli-server') {
19     $_SERVER['PHP_SELF'] = '/' . basename(__FILE__);
20
21     $url = parse_url(urldecode($_SERVER['REQUEST_URI']));
22     $file = __DIR__ . $url['path'];
23     if (strpos($url['path'], '..') === false && strpos($url['path'], '.') !== false && is_file($file)) {
24         return false;
25     }
26 }
27 require dirname(__DIR__) . '/vendor/autoload.php';
28
29 use App\Application;
30 use Cake\Http\Server;
31
32 // Bind your application to the server.
33 $server = new Server(new Application(dirname(__DIR__) . '/config'));
34
35 // Run the request/response through the application
36 // and emit the response.
37 $server->emit($server->run());