PHP uses the Get variable to obtain Chinese garbled characters. As we all know, GET in php cannot deliver Chinese characters, but it is generally garbled, but sometimes we need to deliver Chinese characters, take the latest project "share a collection" of the fire network for example. it is well known that in php, GET cannot deliver Chinese characters, but it is generally garbled, but sometimes we need to deliver Chinese characters, let's take a look at the recent project "share/add to favorites" of the helper's house. I encountered this problem when I wrote the PHP program. after the obtained Chinese titles were passed to the Sina favorites, it becomes garbled.
How can this problem be solved? We:
Normal statement (garbled ):
Copy to ClipboardReference content: [www.bkjia.com] @ $ title_this = $ _ GET ["title"];
Change to the following code (normal ):
Copy to ClipboardReference: [www.bkjia.com] @ $ title_this = iconv ("UTF-8", "gb2312", $ _ GET ["title"]);
After the problem is solved, do not forget to go to the new project-share & add to favorites. Http://www.bkjia.com/res/share/
...