utf-8-PHP 乱码的顽症--部分乱码

WBOY
Release: 2016-06-02 11:29:05
Original
1652 people have browsed it

utf-8php乱码

先上代码

header("content-type:text/html;charset=utf-8");

$filep="text/ok.txt";
if(file_exists($filep))
{
$fop=fopen($filep,"r");
$k=0;
while(!feof($fop)&&$k {
$str=fread($fop,"200");
echo "

".str_ireplace("\r\n","
",$str)."

";
$k=$k+200;
}
}

else
{
echo "failed open file";
}
clearstatcache();
?>
输出是这样的,(我的ok.txt文本中内容是--本文--两个字的不断重复。)
上图。
图片说明

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!