How should php urlencode solve the problem of garbled codes?
This article introduces how to solve the problem of garbled code in php urlencode. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.
Php urlencode method to solve garbled code: 1, open the corresponding code file; 2, encode "$row ['title']"; 3, get the code and query it.
This article operating environment: Windows7 system, PHP7.1, Dell G3 computer.
How does php urlencode solve the garbled problem?
Solving the problem of garbled Code with urlencode function in php
When we write php programs, we generally pay little attention to urlencode coding, in order to avoid coding errors.
When writing a program, whenever Chinese characters are transmitted by get, they are encoded in urlencode, and there is no need to decode after encoding.
It can be used directly. This is very useful when we query characters in Chinese. Garbled can be avoided.
Here is an example of me: