Created
June 6, 2012 11:10
-
-
Save sasezaki/2881304 to your computer and use it in GitHub Desktop.
PHP testing header*
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * server | |
| * $php -S localhost:8080 server.php | |
| */ | |
| use Zend\Http\PhpEnvironment\Response; | |
| use Zend\Http\Header\ContentType; | |
| include 'tests/_autoload.php'; | |
| class ForTest extends ContentType | |
| { | |
| protected $value = 'text/html'; | |
| } | |
| $response = new Response; | |
| $response->headers()->addHeader(new ForTest); | |
| $response->setContent(''); | |
| echo $response; | |
| //if (isset($_GET['die']) && $_GET['die']) { | |
| posix_kill(posix_getpid(), 9); | |
| //} | |
| /** | |
| * client | |
| */ | |
| //file_get_contents('http://localhost:8080/'); | |
| //global $http_response_header |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment