Re: A problem about urlencode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Teng Wang wrote:

I have a url containing some multi-byte characters. So I
need urlencode() to change these characters into the %xx
form. However, when I encode the whole url string, "/" is
also be encoded as "%2F". How to solve this problem? I don't
want to analyze the url string before/after urlencode().


According to my understanding this is the correct behaviour for url encode. The fact that your string is multibyte or not has little relevence in convertin '/' to %2f. You are unly supposed to use the urlencode() function on the query string or to be more precise on each value that you pass via the query string and NOT on the whole URL.








--
Raditha Dissanayake.
------------------------------------------------------------------------
http://www.radinks.com/sftp/         | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux