php中,通过fread函数直接读取文件,文件内容如果遇到中文则会出现乱码问题,这个该如何去解决?
phpcn_u15822017-05-16 13:12:49
Try transcoding the content after reading it
iconv('gbk', 'utf-8', $data)
黄舟2017-05-16 13:12:49
That’s because the encoding of your output page is inconsistent with the encoding of the file being read