<?php
$file = fopen("liuyan.txt", "r") or exit("Unable to open file!");
//Output a line of the file until the end is reached
while(!feof($file))
{
echo fgets($file);
}
fclose($file);
?>为什么输出来的内容是乱码,要怎么解决呀,急啊?
$file = fopen("liuyan.txt", "r") or exit("Unable to open file!");
//Output a line of the file until the end is reached
while(!feof($file))
{
echo fgets($file);
}
fclose($file);
?>为什么输出来的内容是乱码,要怎么解决呀,急啊?
解决方案 »
- 请教关于php extends 以及 parent::__construct();重复执行问题
- 关于PHP取COOKIE的问题,请求帮助!
- 求一个SQL
- 把按钮提交表单形式改为超链接提交形式后无法直接登录!!按钮提交可以,超链接不行,求教 !!!!!!!
- 在wap页面中显示mysql中文,即提示格式不支持!
- 正则表达式???(急,急,急)在线等
- zend studio里面怎样将字体放大点?
- 我的这条SQL语句怎么写,好心人帮我看看!英雄救美一下
- 新闻发布系统中文字段落的处理,请高手帮忙!!谢谢
- OCI连接oracle,如何选择不同的数据库名
- IE6下,回车不能提交表单
- 与大家分享今天工作中的一件趣事,一个warning引发的“血案”
用iconv转码试一下
还是搜别人的帖子吧.
$file = fopen("liuyan.txt", "r") or exit("Unable to open file!");
//Output a line of the file until the end is reached
while(!feof($file)){
$string .= fgets($file);
}
fclose($file);
$chinese = iconv('ISO-8859-1', 'GB2312', $string);
echo $chinese;
?>