public/index.php line 49

Open in your IDE?
  1. <?php
  2. set_time_limit(30);
  3. ini_set("memory_limit""-1");
  4. use App\Kernel;
  5. use Symfony\Component\Debug\Debug;
  6. use Symfony\Component\HttpFoundation\Request;
  7. function curPageURL() {
  8.     $pageURL 'http';
  9.     if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
  10.     $pageURL .= "://";
  11.     if ($_SERVER["SERVER_PORT"] != "80") {
  12.         $pageURL .= $_SERVER["HTTP_HOST"]."".$_SERVER["REQUEST_URI"];
  13.     } else {
  14.         $pageURL .= $_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"];
  15.     }
  16.     return $pageURL;
  17. }
  18. $url curPageURL();
  19. if ($url === 'https://www.centrumkrzesel.pl/art/16/jak-wybrac-ergonomiczne-krzeslo') {
  20.     header("Location: https://www.centrumkrzesel.pl/blog/16/jak-wybrac-ergonomiczne-krzeslo");
  21.     exit(); 
  22. }
  23. //if ($_SERVER['REMOTE_ADDR']=='85.221.152.164' || $_SERVER['REMOTE_ADDR'] === '185.229.227.78') {
  24. if (1==1) {
  25.     require dirname(__DIR__).'/config/bootstrap.php';
  26.     if ($_SERVER['APP_DEBUG']) {
  27.         umask(0000);
  28.         Debug::enable();
  29.     }
  30.     if ($trustedProxies $_SERVER['TRUSTED_PROXIES'] ?? $_ENV['TRUSTED_PROXIES'] ?? false) {
  31.         Request::setTrustedProxies(explode(','$trustedProxies), Request::HEADER_X_FORWARDED_ALL Request::HEADER_X_FORWARDED_HOST);
  32.     }
  33.     if ($trustedHosts $_SERVER['TRUSTED_HOSTS'] ?? $_ENV['TRUSTED_HOSTS'] ?? false) {
  34.         Request::setTrustedHosts([$trustedHosts]);
  35.     }
  36.     $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  37.     $request Request::createFromGlobals();
  38.     $response $kernel->handle($request);
  39.     $response->send();
  40.     $kernel->terminate($request$response);
  41. } else {
  42.     echo '-';
  43.     exit();
  44. }