PHP Classes

File: vendor/symfony/http-foundation/Tests/Fixtures/response-functional/common.inc

Recommend this page to a friend!
  Classes of Hillary Kollan   Chatto PHP Websocket Chat System   vendor/symfony/http-foundation/Tests/Fixtures/response-functional/common.inc   Download  
File: vendor/symfony/http-foundation/Tests/Fixtures/response-functional/common.inc
Role: Example script
Content type: text/plain
Description: Example script
Class: Chatto PHP Websocket Chat System
Websocket based chat system using Ratchet library
Author: By
Last change:
Date: 3 years ago
Size: 927 bytes
 

Contents

Class file image Download
<?php

use Symfony\Component\HttpFoundation\Response;

$parent = __DIR__;
while (!@
file_exists($parent.'/vendor/autoload.php')) {
    if (!@
file_exists($parent)) {
       
// open_basedir restriction in effect
       
break;
    }
    if (
$parent === dirname($parent)) {
        echo
"vendor/autoload.php not found\n";
        exit(
1);
    }

   
$parent = dirname($parent);
}

require
$parent.'/vendor/autoload.php';

error_reporting(-1);
ini_set('html_errors', 0);
ini_set('display_errors', 1);

if (
filter_var(ini_get('xdebug.default_enable'), FILTER_VALIDATE_BOOLEAN)) {
   
xdebug_disable();
}

header_remove('X-Powered-By');
header('Content-Type: text/plain; charset=utf-8');

register_shutdown_function(function () {
    echo
"\n";
   
session_write_close();
   
print_r(headers_list());
    echo
"shutdown\n";
});
ob_start();

$r = new Response();
$r->headers->set('Date', 'Sat, 12 Nov 1955 20:04:00 GMT');

return
$r;