php gets operating system encoding
China丶Moli
China丶Moli 2019-07-22 15:03:23
0
3
1233

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?

China丶Moli
China丶Moli

reply all (2)
勇敢的心

Try to transfer to one more level

  • reply Could you please explain it in detail? Thank you.
    China丶Moli author 2019-07-22 19:12:51
China丶Moli

Occupy the first floor by yourself

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!