开发者

html_entity_decode for POST/GET value

I have a text like this:

加入营销计划 Informática \xf3

and i want to do html_entity_decode

If I'm saying

$str = $_GET['str']

... where $_GET['str'] is my string

html_entity_decode($str, ENT_NOQUOTES, 'utf-8');

... will return the same string, with no change.

But, if I'm saying

$str = "加入营销计划 Informática \xf3";
html_entity_decode($str, ENT_NOQUO开发者_高级运维TES, 'utf-8');

... will return modified string. Why and what I should do to have the correct value when I get the string from GET/POST ?


I feel that's because $_GET doesn't accept \ in your $_GET string. try to base64_encode(); your string and put it to $_GET['str'] (it means that you will have another link without these chars)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜