I recently used the scandir() function in developing a project
I found a problem during use:
When I traversed the file, garbled characters appeared under windows, but not garbled under Linux. , the tutorial found on the Internet said that the obtained file is gbk transcoded to utf-8.
But after transcoding, windows are no longer garbled, but Linux is garbled. At this time, I thought of another solution that is to judge the system and only transcode windows.
But the problem occurred again. I used PHPstudy to build a development environment locally. There was no problem at all. I transferred the project to the server. The server used a windows system. I also used PHPstudy to build the environment. , something went wrong when using the project. I don’t know how to solve it. Is there any way to solve it?
Try to transfer to one more level
Occupy the first floor by yourself