PHP读取文件,解决中文乱码UTF-8的方法分析 本文实例讲述了PHP读取文件,解决中文乱码UTF-8的方法.分享给大家供大家参考,具体如下: $opts = array( ‘file’ => array( ‘encoding’ => "utf-8" ) ); $opts = array(‘http’ => array(‘encoding’ => ‘utf-8′)); $ctxt = stream_context_create($opts); $content = file_get_contents(