PHP reads the file content through fread(). How to solve the problem of garbled Chinese characters?
我想大声告诉你2017-05-16 13:10:49
0
2
1477
In PHP, files are read directly through the fread function. If the file content encounters Chinese characters, the problem will be garbled. How to solve this problem?
Try transcoding the content after reading it
That’s because the encoding of your output page is inconsistent with the encoding of the file being read