今天从早上弄到现在也没解决~~~~这里我想先谈一下这个 file_get_contents
今天为了解决乱码问题,我又把精华帖子里面的看了一遍了~~之前我也遇到一次~~那次是因为 phpmyadmin的版本不同导致乱码,也费了我不少时间才解决。
废话不多说了~~现在我想问的是 file_get_contents默认的获取方式是utf8~~~我测试了一下,读取utf8网页正常
但是读取gb2312 或者gbk就全乱了~~~~我想这不再是精华帖子里面那一些网页和 数据库之间编码不同导致的问题了。
手册上(If unicode semantics are enabled, the default encoding of the read data is UTF-8. You can specify a different encoding by creating a custom context or by changing the default using stream_default_encoding()).
可是你可以去查一下 根本就没有 stream_default_encoding() 这个函数。
现在我最想知道 file_get_contents() 默认的读取编码可以改变吗????
今天为了解决乱码问题,我又把精华帖子里面的看了一遍了~~之前我也遇到一次~~那次是因为 phpmyadmin的版本不同导致乱码,也费了我不少时间才解决。
废话不多说了~~现在我想问的是 file_get_contents默认的获取方式是utf8~~~我测试了一下,读取utf8网页正常
但是读取gb2312 或者gbk就全乱了~~~~我想这不再是精华帖子里面那一些网页和 数据库之间编码不同导致的问题了。
手册上(If unicode semantics are enabled, the default encoding of the read data is UTF-8. You can specify a different encoding by creating a custom context or by changing the default using stream_default_encoding()).
可是你可以去查一下 根本就没有 stream_default_encoding() 这个函数。
现在我最想知道 file_get_contents() 默认的读取编码可以改变吗????