php fiel_get_contents 输出乱码怎么处理

WBOY
Release: 2016-06-13 12:26:42
Original
807 people have browsed it

php fiel_get_contents 输出乱码怎么办?
我设置了header("content-type='text/html',charset='utf-8'");还是返回乱码怎么办?gb2312和unicode也不行返回的图片如下: 
------解决思路----------------------
被读取的文件是什么?
你最好 echo base64_encode(file_get_contents('文件名')); 贴出来看看
------解决思路----------------------
echo  base64_encode(file_get_contents("php://input")); 
------解决思路----------------------
你的是图片文件吧。
echo base64_encode(file_get_contents($file));

打印出来看看。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
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!