File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed
reference/network/functions Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change 5
5
<refname >headers_list</refname >
6
6
<refpurpose >Returns a list of response headers sent (or ready to send)</refpurpose >
7
7
</refnamediv >
8
-
8
+
9
9
<refsect1 role =" description" >
10
10
&reftitle.description;
11
11
<methodsynopsis >
35
35
&reftitle.examples;
36
36
<para >
37
37
<example >
38
- <title >Examples using <function >headers_list</function ></title >
38
+ <title >Example using <function >headers_list</function ></title >
39
39
<programlisting role =" php" >
40
40
<![CDATA[
41
41
<?php
@@ -45,29 +45,27 @@ setcookie('foo', 'bar');
45
45
46
46
/* Define a custom response header
47
47
This will be ignored by most clients */
48
- header("X-Sample -Test: foo");
48
+ header("Example -Test: foo");
49
49
50
50
/* Specify plain text content in our response */
51
- header('Content-type : text/plain');
51
+ header('Content-Type : text/plain; charset=UTF-8 ');
52
52
53
53
/* What headers are going to be sent? */
54
54
var_dump(headers_list());
55
55
56
56
?>
57
57
]]>
58
58
</programlisting >
59
- &example.outputs;
59
+ &example.outputs.similar ;
60
60
<screen >
61
61
<![CDATA[
62
- array(4 ) {
62
+ array(3 ) {
63
63
[0]=>
64
- string(23) "X-Powered-By: PHP/5.1.3"
65
- [1]=>
66
64
string(19) "Set-Cookie: foo=bar"
65
+ [1]=>
66
+ string(17) "Example-Test: foo"
67
67
[2]=>
68
- string(18) "X-Sample-Test: foo"
69
- [3]=>
70
- string(24) "Content-type: text/plain"
68
+ string(39) "Content-Type: text/plain; charset=UTF-8"
71
69
}
72
70
73
71
]]>
You can’t perform that action at this time.
0 commit comments