The parameters received by the URL are garbled, but the local post is normal. finally, cg20 edited http: // localhost/xs7k/search/author-long.html & nbsp; it is normal that URL rewriting corresponds to garbled parameters received by the URL, but local operations are normal.
At the end of this post, cg20 edited http: // localhost/xs7k/search/author-dragon .html at 22:54:57 on January 14 ,.
Here, the URL rewriting corresponds to xs7k/search/index. php? Type = $1 & key = $2
It is normal to obtain the key locally. Previously, bluehost was used normally.
On the server, it will not work at http://www.xs7k.com/search/author-long.html, such as this one.
Today, I switched to iis in china. if the number is only Chinese, an error occurs "?? "Shown in this way. Is there any solution.
Use $ _ REQUEST or $ _ GET.
------ Solution --------------------
$ Url = "http: // localhost/xs7k/search/". UrlEnCode ('author-long'). ". html ";
Encode the Chinese character before passing the $ url variable.
If urlencode is not encoded, you can use Base64_Encode. However, if Base64_Encode is used, you must use the corresponding decoding function to decode it. UrlEnCode is not so troublesome.
------ Solution --------------------
The character set is different when different browsers transmit Chinese characters. There are GBK, there are also UTF-8. Use urlencode.
------ Solution --------------------
In addition, I am talking about transmitting Chinese characters in the address bar.
------ Solution --------------------
Or the first floor method, you can directly obtain the converted value, such as php: alt = "urlencode ('long')" JS: attr (alt)
------ Solution --------------------
Reference:
This is the http: // localhost/xs7k/search/author-dragon .html
Location. href = '../search/'Your type.options?type.selectedindex}.value='-'your key.value='.html ';
If key. value is encoded here, PHP cannot be used here?
Try to output the key. vlaue value in the background