note 39491 deleted from function.urlencode by tularis
| From: | tularis@php.net | Date: | Sun, 19 Dec 2004 09:41:47 +0000 |
| Subject: | note 39491 deleted from function.urlencode by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-82018@lists.php.net to get a copy of this message | ||
Note Submitter: cameron at enprisesolutions dot com
----
>I have tried to make a redirection with urlencode(). If the url >contains "/"
>characters, they are replaced with "%2F" and >browser won't find the file. This
>is expected behavior, just a >warning to people.
here is my solution to urlencode slashes(/) in a redirection so the browser doesnt return an error.
function myurlencode ( $TheVal )
{
return urlencode (str_replace("/","{+}",$TheVal));
}
function myurldecode ( $TheVal )
{
return str_replace("{+}","/",urldecode ($TheVal));
}