reference/url/constants.xml
a0ae28d3bc85f927c22649ebd9a590b921534b7d
...
...
@@ -5,13 +5,13 @@
5
5
&extension.constants;
6
6
<para>
7
7
The following constants are meant to be used with
8
-
<function>parse_url</function> and are available since PHP 5.1.2.
8
+
<function>parse_url</function>.
9
9
</para>
10
10
<variablelist>
11
-
<varlistentry>
11
+
<varlistentry xml:id="constant.php-url-scheme">
12
12
<term>
13
13
<constant>PHP_URL_SCHEME</constant>
14
-
(<type>integer</type>)
14
+
(<type>int</type>)
15
15
</term>
16
16
<listitem>
17
17
<simpara>
...
...
@@ -19,80 +19,112 @@
19
19
</simpara>
20
20
</listitem>
21
21
</varlistentry>
22
-
<varlistentry>
22
+
<varlistentry xml:id="constant.php-url-host">
23
23
<term>
24
24
<constant>PHP_URL_HOST</constant>
25
-
(<type>integer</type>)
25
+
(<type>int</type>)
26
26
</term>
27
27
<listitem>
28
28
<simpara>
29
-
29
+
Outputs the hostname of the URL parsed.
30
30
</simpara>
31
31
</listitem>
32
32
</varlistentry>
33
-
<varlistentry>
33
+
<varlistentry xml:id="constant.php-url-port">
34
34
<term>
35
35
<constant>PHP_URL_PORT</constant>
36
-
(<type>integer</type>)
36
+
(<type>int</type>)
37
37
</term>
38
38
<listitem>
39
39
<simpara>
40
-
40
+
Outputs the port of the URL parsed.
41
41
</simpara>
42
42
</listitem>
43
43
</varlistentry>
44
-
<varlistentry>
44
+
<varlistentry xml:id="constant.php-url-user">
45
45
<term>
46
46
<constant>PHP_URL_USER</constant>
47
-
(<type>integer</type>)
47
+
(<type>int</type>)
48
48
</term>
49
49
<listitem>
50
50
<simpara>
51
-
51
+
Outputs the user of the URL parsed.
52
52
</simpara>
53
53
</listitem>
54
54
</varlistentry>
55
-
<varlistentry>
55
+
<varlistentry xml:id="constant.php-url-pass">
56
56
<term>
57
57
<constant>PHP_URL_PASS</constant>
58
-
(<type>integer</type>)
58
+
(<type>int</type>)
59
59
</term>
60
60
<listitem>
61
61
<simpara>
62
-
62
+
Outputs the password of the URL parsed.
63
63
</simpara>
64
64
</listitem>
65
65
</varlistentry>
66
-
<varlistentry>
66
+
<varlistentry xml:id="constant.php-url-path">
67
67
<term>
68
68
<constant>PHP_URL_PATH</constant>
69
-
(<type>integer</type>)
69
+
(<type>int</type>)
70
70
</term>
71
71
<listitem>
72
72
<simpara>
73
-
73
+
Outputs the path of the URL parsed.
74
74
</simpara>
75
75
</listitem>
76
76
</varlistentry>
77
-
<varlistentry>
77
+
<varlistentry xml:id="constant.php-url-query">
78
78
<term>
79
79
<constant>PHP_URL_QUERY</constant>
80
-
(<type>integer</type>)
80
+
(<type>int</type>)
81
81
</term>
82
82
<listitem>
83
83
<simpara>
84
-
84
+
Outputs the query string of the URL parsed.
85
85
</simpara>
86
86
</listitem>
87
87
</varlistentry>
88
-
<varlistentry>
88
+
<varlistentry xml:id="constant.php-url-fragment">
89
89
<term>
90
90
<constant>PHP_URL_FRAGMENT</constant>
91
-
(<type>integer</type>)
91
+
(<type>int</type>)
92
92
</term>
93
93
<listitem>
94
94
<simpara>
95
-
95
+
Outputs the fragment (string after the hashmark #) of the URL parsed.
96
+
</simpara>
97
+
</listitem>
98
+
</varlistentry>
99
+
</variablelist>
100
+
<para>
101
+
The following constants are meant to be used with
102
+
<function>http_build_query</function>.
103
+
</para>
104
+
<variablelist>
105
+
<varlistentry xml:id="constant.php-query-rfc1738">
106
+
<term>
107
+
<constant>PHP_QUERY_RFC1738</constant>
108
+
(<type>int</type>)
109
+
</term>
110
+
<listitem>
111
+
<simpara>
112
+
Encoding is performed per
113
+
<link xlink:href="&url.rfc;1738">RFC 1738</link> and the
114
+
<literal>application/x-www-form-urlencoded</literal> media type, which
115
+
implies that spaces are encoded as plus (<literal>+</literal>) signs.
116
+
</simpara>
117
+
</listitem>
118
+
</varlistentry>
119
+
<varlistentry xml:id="constant.php-query-rfc3986">
120
+
<term>
121
+
<constant>PHP_QUERY_RFC3986</constant>
122
+
(<type>int</type>)
123
+
</term>
124
+
<listitem>
125
+
<simpara>
126
+
Encoding is performed according to <link xlink:href="&url.rfc;3986">RFC 3986</link>,
127
+
and spaces will be percent encoded (<literal>%20</literal>).
96
128
</simpara>
97
129
</listitem>
98
130
</varlistentry>
99
131