When using thinkphp to do tags tags, there is a problem, is to get parameters, but can not find the corresponding results. View database discovery data is present. What's the problem?
Calls that are shaped like http:/www.xxxx.com/tags/index/%e8%87%aa%e5%8a%a8%e9%aa%8c%e8%af%81.html
The parameters are encoded by UrlEncode (), decoded using the UrlDecode () function, and the query still has no results.
Immediately after the test conversion code ICONV () function, the result was successful.
The default encoding for the browser is GB2312, and this project uses UTF-8 encoding.
Here is the wrong code and the revised code for everyone to see:
$kw = $_get[' _url_ ' [' 2 ']; The wrong code, the parameters that can be obtained on IIS, but the query does not produce the results. $kw = Iconv ("gb2312", "Utf-8", $_get[' _url_ ' [' 2 ']); After the code conversion, can query the results.
In addition, this method applies only to the IIS environment .
Also note that the$_get receive the parameters of the time itself has urldecode transcoding function, do not need to urldecode decoding operation!
http://www.bkjia.com/PHPjc/824775.html www.bkjia.com true http://www.bkjia.com/PHPjc/824775.html techarticle when using thinkphp to do tags tags, there is a problem, is to get parameters, but can not find the corresponding results. View database discovery data is present. What 's the problem?