PHP fails to receive http: // 127.0.0.1/index. php? Admin & q = module/user/list & site_id = 50 & a = userinfo & realname = % D2 % FC % BD % A8 % C0 % A4
On a LINUX server, $ data ['realname'] = $ _ GET ['realname']; this method cannot obtain the realname parameter. there is no problem in local testing. please explain it !!
Reply to discussion (solution)
Var_dump ($ _ GET); // You can check the output data.
Thank you for your reply. slog ("user name:". $ data ['realname']);
I typed logs in a self-writing method, but the English parameters can be passed in and printed out. I suspect that Chinese characters cannot be typed on the linux server, it's okay to print the test log in the local windows environment. Is there any good suggestions?
header('Content-type: text/html;charset=GBK');echo urldecode('%D2%FC%BD%A8%C0%A4');
Yin Jiankun
header('Content-type: text/html;charset=GBK');echo urldecode('%D2%FC%BD%A8%C0%A4');
Yin Jiankun
++.
Header ('content-type: text/html; charset = gbk ');
Echo urldecode ('% D2 % FC % BD % A8 % C0 % A4 ');
In this section, the code is uploaded to the server and the local access to the server actually prints out my name.
Slog (mb_convert_encoding ("user name:". $ data ['realname'], "UTF-8", "GBK "));
Slog (mb_convert_encoding ("user email:". $ data ['e-mail '], "UTF-8", "GBK "));
Slog (mb_convert_encoding ("user name:". $ data ['realname'], "GBK", "UTF-8 "));
Slog (mb_convert_encoding ("user email:". $ data ['e-mail '], "GBK", "UTF-8 "));
It is estimated that the encoding format is not a problem. I cannot print the encoding format in this way. please explain it !!
The problem lies in the slog function. you cannot find the reason outside.
This is not the case. the slog is added because the PrePass parameter cannot be searched. you need to check whether all the English logs are displayed and Chinese characters cannot be found. now I want to remove slog, when all the code has not been changed, the passing of parameter search returns to normal again. sorry, sorry...