note 96256 modified in function.urlencode by thiago
| From: | thiago@php.net | Date: | Wed, 17 Feb 2010 15:15:18 +0000 |
| Subject: | note 96256 modified in function.urlencode by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-166075@lists.php.net to get a copy of this message | ||
if one wants to encode a url that contains unicode characters, he can se this code:
<?php
function encode_full_url(&$url)
{
$url = urlencode($url);
$url = str_replace("%2F", "/", $url);
$url = str_replace("%3A", ":", $url);
return $url;
}
?>
a little stupid, but gets the work done.
--was--
if one wants to encode a url that contains unicode characters, he can se this code:
function encode_full_url(&$url)
{
$url = urlencode($url);
$url = str_replace("%2F", "/", $url);
$url = str_replace("%3A", ":", $url);
return $url;
}
a little stupid, but gets the work done.
http://php.net/manual/en/function.urlencode.php