URL received the parameter is garbled, but the local is normal
http://localhost/xs7k/search/author-Dragon. HTML is normal.
Here are the URL rewriting corresponding to the xs7k/search/index.php?type=$1&key=$2
Local access to the key is normal, formerly used Bluehost of the main is normal
The server is not going to http://www.xs7k.com/search/author-. html, such as this.
Today for the domestic IIS, can count as long as the Chinese is wrong "??" Shown in this way, is there any way to solve.
$_request or $_get are the same.
------Solution--------------------
$url = "http://localhost/xs7k/search/". UrlEncode (' author-Dragon '). " HTML ";
First put the Chinese code and then pass the variable of the ".
If urlencode This code is not good, you use Base64_encode code, but with base64_encode words need to decode the corresponding decoding function. UrlEncode is not so troublesome.
------Solution--------------------
When different browsers transfer Chinese, the character set is different. There are GBK, there are UTF-8. It would be more appropriate to use a urlencode.
------Solution--------------------
To add, I'm talking about transferring Chinese in the address bar.
------Solution--------------------
Or the 1 floor method, you will directly take the value of the time to take the converted value, such as php:alt= "UrlEncode (' Dragon ')" Js:attr (ALT)
------Solution--------------------
discuss
My sentence is from JS to the past http://localhost/xs7k/search/author-Dragon. html
Location.href= '. /search/' +type.options[type.selectedindex].value+ '-' +key.value+ '. html ';
In this case, if the Key.value code, PHP can not be used here?
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.