diff --git a/functions/url.xml b/functions/url.xml index f417c5ca8c..dc092b7789 100644 --- a/functions/url.xml +++ b/functions/url.xml @@ -1,4 +1,4 @@ - + URL Functions URLs @@ -22,7 +22,7 @@ data. The returned data may be binary. - See also: base64_encode, RFC-2045 section + See also: base64_encode, RFC2045 section 6.8. @@ -54,7 +54,7 @@ See also: base64_decode, chunk_split, - RFC-2045 section 6.8. + RFC2045 section 6.8. @@ -130,20 +130,20 @@ characters from being interpreted as special URL delimiters, and for protecting URL's from being mangled by transmission media with character conversions (like some email systems). For - example, if you want to include a password in an ftp url: + example, if you want to include a password in an FTP URL: <function>rawurlencode</function> example 1 -echo '<A HREF="ftp://user:', rawurlencode ('foo @+%/'), +echo '<a href="ftp://user:', rawurlencode('foo @+%/'), '@ftp.my.com/x.txt">'; - Or, if you pass information in a path info component of the url: + Or, if you pass information in a PATH_INFO component of the URL: <function>rawurlencode</function> example 2 -echo '<A HREF="http://x.com/department_list_script/', - rawurlencode ('sales and marketing/Miami'), '">'; +echo '<a href="http://x.com/department_list_script/', + rawurlencode('sales and marketing/Miami'), '">'; @@ -174,12 +174,12 @@ echo '<A HREF="http://x.com/department_list_script/', <function>urldecode</function> example -$a = split ('&', $QUERY_STRING); +$a = split('&', $QUERY_STRING); $i = 0; -while ($i < count ($a)) { - $b = split ('=', $a [$i]); - echo 'Value for parameter ', htmlspecialchars (urldecode ($b [0])), - ' is ', htmlspecialchars (urldecode ($b [1])), "<BR>"; +while ($i < count($a)) { + $b = split('=', $a[$i]); + echo 'Value for parameter ', htmlspecialchars(urldecode($b[0])), + ' is ', htmlspecialchars(urldecode($b[1])), "<br>"; $i++; } @@ -222,7 +222,7 @@ while ($i < count ($a)) { <function>urlencode</function> example -echo '<A HREF="mycgi?foo=', urlencode ($userinput), '">'; +echo '<a href="mycgi?foo=', urlencode($userinput), '">'; @@ -243,7 +243,7 @@ echo '<A HREF="mycgi?foo=', urlencode ($userinput), '">'; <function>urlencode/htmlentities</function> example -echo '<A HREF="mycgi?foo=', htmlentities (urlencode ($userinput) ), '">'; +echo '<a href="mycgi?foo=', htmlentities (urlencode ($userinput) ), '">';