DimitarTsvetkov

start.php

Oct 31st, 2019
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. <?php
  2.  
  3. use Psr\Http\Message\ResponseInterface as Response;
  4. use Psr\Http\Message\ServerRequestInterface as Request;
  5. use Slim\Factory\AppFactory;
  6. use Slim\Exception\HttpNotFoundException;
  7.  
  8. session_cache_limiter(false);
  9. session_start();
  10.  
  11. ini_set('display_errors', 'On');
  12.  
  13. define('INC_ROOT', dirname(__DIR__));
  14.  
  15. require INC_ROOT . '/vendor/autoload.php';
  16.  
  17. $app = AppFactory::create();
  18.  
  19. $app->get('/test', function (Request $request, Response $response) {
  20.  
  21. echo 'This is a test route.';
  22.  
  23. });
Advertisement
Add Comment
Please, Sign In to add comment