Web Interfaces of PROSUME

index.php 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * The Front Controller for handling every request
  4. *
  5. * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  6. * Copyright (c) Cake Software Foundation, Inc. (https://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. (https://cakefoundation.org)
  13. * @link https://cakephp.org CakePHP(tm) Project
  14. * @since 0.2.9
  15. * @license MIT License (https://opensource.org/licenses/mit-license.php)
  16. */
  17. // Check platform requirements
  18. require dirname(__DIR__) . '/config/requirements.php';
  19. // For built-in server
  20. if (PHP_SAPI === 'cli-server') {
  21. $_SERVER['PHP_SELF'] = '/' . basename(__FILE__);
  22. $url = parse_url(urldecode($_SERVER['REQUEST_URI']));
  23. $file = __DIR__ . $url['path'];
  24. if (strpos($url['path'], '..') === false && strpos($url['path'], '.') !== false && is_file($file)) {
  25. return false;
  26. }
  27. }
  28. require dirname(__DIR__) . '/vendor/autoload.php';
  29. use App\Application;
  30. use Cake\Http\Server;
  31. // Bind your application to the server.
  32. $server = new Server(new Application(dirname(__DIR__) . '/config'));
  33. // Run the request/response through the application and emit the response.
  34. $server->emit($server->run());