From e25733d0b18ce23d8f76e1903a182418786f07d6 Mon Sep 17 00:00:00 2001 From: Ron Chmara Date: Sun, 25 Feb 2001 01:34:59 +0000 Subject: [PATCH] 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 --- functions/url.xml | 47 +++++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/functions/url.xml b/functions/url.xml index 8d216913bb..17982b1c43 100644 --- a/functions/url.xml +++ b/functions/url.xml @@ -102,8 +102,8 @@ See also rawurlencode, - urldecode, - urlencode. + urldecode, + urlencode. @@ -148,8 +148,8 @@ echo '<A HREF="http://x.com/department_list_script/', See also rawurldecode, - urldecode, - urlencode. + urldecode, + urlencode. @@ -173,7 +173,7 @@ echo '<A HREF="http://x.com/department_list_script/', <function>Urldecode</function> example -$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)) { See also urlencode, - rawurlencode, - rawurldecode. + function>rawurlencode, + rawurldecode. @@ -225,29 +225,32 @@ echo '<A HREF="mycgi?foo=', urlencode ($userinput), '">'; - 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: &url.argsep; - 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 htmlentities(urlencode($data)). + + 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: + &url.argsep; 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 htmlentities(urlencode($data)). <function>Urlencode/htmlentities</function> example echo '<A HREF="mycgi?foo=', htmlentities (urlencode ($userinput) ), '">'; - + See also urldecode, - htmlentities, - rawurldecode, - rawurlencode. + htmlentities, + rawurldecode, + rawurlencode.