| Newsgroups |
php.bugs |
| Message-ID |
<[email protected]> |
Edit report at https://bugs.php.net/bug.php?id=74322&edit=1
ID: 74322
Updated by: [email protected]
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