reference/network/functions/headers-list.xml
eecf09080681d1e242b9dc1b8a8148eda66141f8
...
...
@@ -19,6 +19,11 @@
19
19
</para>
20
20
</refsect1>
21
21

22
+
<refsect1 role="parameters">
23
+
&reftitle.parameters;
24
+
&no.function.parameters;
25
+
</refsect1>
26
+

22
27
<refsect1 role="returnvalues">
23
28
&reftitle.returnvalues;
24
29
<para>
...
...
@@ -30,7 +35,7 @@
30
35
&reftitle.examples;
31
36
<para>
32
37
<example>
33
-
<title>Examples using <function>headers_list</function></title>
38
+
<title>Example using <function>headers_list</function></title>
34
39
<programlisting role="php">
35
40
<![CDATA[
36
41
<?php
...
...
@@ -40,10 +45,10 @@ setcookie('foo', 'bar');
40
45

41
46
/* Define a custom response header
42
47
This will be ignored by most clients */
43
-
header("X-Sample-Test: foo");
48
+
header("Example-Test: foo");
44
49

45
50
/* Specify plain text content in our response */
46
-
header('Content-type: text/plain');
51
+
header('Content-Type: text/plain; charset=UTF-8');
47
52

48
53
/* What headers are going to be sent? */
49
54
var_dump(headers_list());
...
...
@@ -51,18 +56,16 @@ var_dump(headers_list());
51
56
?>
52
57
]]>
53
58
</programlisting>
54
-
&example.outputs;
59
+
&example.outputs.similar;
55
60
<screen>
56
61
<![CDATA[
57
-
array(4) {
62
+
array(3) {
58
63
[0]=>
59
-
string(23) "X-Powered-By: PHP/5.1.3"
60
-
[1]=>
61
64
string(19) "Set-Cookie: foo=bar"
65
+
[1]=>
66
+
string(17) "Example-Test: foo"
62
67
[2]=>
63
-
string(18) "X-Sample-Test: foo"
64
-
[3]=>
65
-
string(24) "Content-type: text/plain"
68
+
string(39) "Content-Type: text/plain; charset=UTF-8"
66
69
}
67
70

68
71
]]>
69
72