Bug #74322 [Opn->Spm]: HTTP://
| From: | requinix@php.net | Date: | Tue, 28 Mar 2017 05:46:14 +0000 |
| Subject: | Bug #74322 [Opn->Spm]: HTTP:// | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-208109@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74322&edit=1
ID: 74322
Updated by: requinix@php.net
Reported by: admin at angosso dot net
Summary: HTTP://
-Status: Open
+Status: Spam
Type: Bug
Package: Apache2 related
Operating System: Linux
PHP Version: 7.0.17
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2017-03-28 00:34:09] admin at angosso dot net
Description:
------------
array apache_response_headers ( void )
Test script:
---------------
<?php
print_r(apache_response_headers());
?>
Expected result:
----------------
<?php
$headers = apache_request_headers();
foreach ($headers as $header => $value) {
echo "$header: $value <br />\n";
}
// If no header has been sent, send it
If (! Headers_sent ()) {
    Header ('Location: http://www.example.com/');
    Exit;
}
 Â
// Here is an example of using the optional file and line parameters
// available since PHP 4.3.0. Note that $ filename and $ linenum are
// transmitted for later use. Do not assign them before using them.
If (! Headers_sent ($ filename, $ linenum)) {
    Header ('Location: http://www.example.com/');
    Exit;
// You will probably trigger an error here
} Else {
    Echo "The headers have already been sent from the $ filename file to the $
linenum \ n" line.
          "It is therefore impossible to redirect automatically,
so please
          Click <a href=\"http://www.example.com\"> here </a>. \ N
";
    Exit;
}
?>
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74322&edit=1