Manage the newly written graph beds todayProgramThe encoding was changed to the UTF-8 format. I wanted to move closer to foreign standards. The result was just a big problem. Originally, my files were all ANSI. I used notepad to replace them with UTF-8 one by one, then remove the BOM, and I don't know if it's okay except for the problem, but there are some garbled characters. I thought it was wrong when I changed the code, will it make the two types of code combination? I have made it for a long time, and even re-established the files. I am not a zombie, so I will lock the scandir, the garbled characters only appear in the use of this function, but I think it is still wrong. Yesterday this function scanned the Chinese file name and it was okay. Today it is derailed?
I re-created a file test, and it showed that the file name in Chinese is correct and there is no pressure on it. It's crazy for me. In the end, I can't stand it anymore. Listen to the song first, suffocate the feeling, and suddenly think of it, when uploading a file with a Chinese file name yesterday, uploadify will also save the file name as garbled characters. Well, I will try it again. If I use iconv to change the encoding, OK, okay, day, this is a problem, for so long, PHP is ..........
Summary:Because the page encoding is UTF-8, and the file name returned by scandir should be GBK (I don't know if this is the case), there is a problem. You can change the page encoding to GBK, so here we can use iconv to convert it. Ah, the damn code is still the most cute of Qin Shihuang.