mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 17:08:54 +00:00
Fixing reference to $querystring, de-tabbing (minor XML cleanups).
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@41841 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
54a5321a36
commit
e25733d0b1
1 changed files with 25 additions and 22 deletions
|
@ -102,8 +102,8 @@
|
|||
</para>
|
||||
<simpara>
|
||||
See also <function>rawurlencode</function>,
|
||||
<function>urldecode</function>,
|
||||
<function>urlencode</function>.
|
||||
<function>urldecode</function>,
|
||||
<function>urlencode</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
@ -148,8 +148,8 @@ echo '<A HREF="http://x.com/department_list_script/',
|
|||
</para>
|
||||
<simpara>
|
||||
See also <function>rawurldecode</function>,
|
||||
<function>urldecode</function>,
|
||||
<function>urlencode</function>.
|
||||
<function>urldecode</function>,
|
||||
<function>urlencode</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
@ -173,7 +173,7 @@ echo '<A HREF="http://x.com/department_list_script/',
|
|||
<example>
|
||||
<title><function>Urldecode</function> example</title>
|
||||
<programlisting role="php">
|
||||
$a = split ('&', $querystring);
|
||||
$a = split ('&', $QUERY_STRING);
|
||||
$i = 0;
|
||||
while ($i < count ($a)) {
|
||||
$b = split ('=', $a [$i]);
|
||||
|
@ -186,8 +186,8 @@ while ($i < count ($a)) {
|
|||
</para>
|
||||
<para>
|
||||
See also <function>urlencode</function>,
|
||||
<function>rawurlencode</function>,
|
||||
<function>rawurldecode</function>.
|
||||
function>rawurlencode</function>,
|
||||
<function>rawurldecode</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
@ -225,29 +225,32 @@ echo '<A HREF="mycgi?foo=', urlencode ($userinput), '">';
|
|||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>Note: Be careful about variables that may match HTML entities.
|
||||
Things like &amp, &copy and &pound are parsed by the browser
|
||||
and the actual entity is used instead of the desired variable name. This
|
||||
is an obvious hassle that the W3C has been telling people about for years.
|
||||
The reference is here: <ulink url="&url.argsep;">&url.argsep;</ulink>
|
||||
PHP supports changing the argument separator to the W3C-suggested
|
||||
semi-colon through the arg_separator .ini directive. Unfortunately most
|
||||
user agents do not send form data in this semi-colon separated format.
|
||||
A more portable way around this is to use &amp; instead of & as the
|
||||
separator. You don't need to change PHP's arg_separator for this. Leave
|
||||
it as &, but simply encode your URLs using <function>htmlentities</function>(urlencode($data)).
|
||||
<para>
|
||||
Note: Be careful about variables that may match HTML entities.
|
||||
Things like &amp, &copy and &pound are parsed by the
|
||||
browser and the actual entity is used instead of the desired
|
||||
variable name. This is an obvious hassle that the W3C has been
|
||||
telling people about for years. The reference is here:
|
||||
<ulink url="&url.argsep;">&url.argsep;</ulink> PHP supports
|
||||
changing the argument separator to the W3C-suggested semi-colon
|
||||
through the arg_separator .ini directive. Unfortunately most user
|
||||
agents do not send form data in this semi-colon separated format.
|
||||
A more portable way around this is to use &amp; instead of
|
||||
& as the separator. You don't need to change PHP's
|
||||
arg_separator for this. Leave it as &, but simply encode
|
||||
your URLs using <function>htmlentities</function>(urlencode($data)).
|
||||
<example>
|
||||
<title><function>Urlencode/htmlentities</function> example</title>
|
||||
<programlisting role="php">
|
||||
echo '<A HREF="mycgi?foo=', htmlentities (urlencode ($userinput) ), '">';
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>urldecode</function>,
|
||||
<function>htmlentities</function>,
|
||||
<function>rawurldecode</function>,
|
||||
<function>rawurlencode</function>.
|
||||
<function>htmlentities</function>,
|
||||
<function>rawurldecode</function>,
|
||||
<function>rawurlencode</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
Loading…
Reference in a new issue