【发布时间】:2014-10-03 11:49:43
【问题描述】:
脚本应该显示文件的内容,但是如果开头和结尾有很多字符(超过 8000 个)添加了意外字符(不同文件的字符可能会发生变化)。
b15f
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru" lang="ru">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
...
</body>
</html>
0
b15f和0在哪里?
脚本:
<?php
header("HTTP/1.1 200 OK");
header("Content-Type: text/html; charset=utf-8");
$content = file_get_contents( "index.html" );
echo($content);
?>
【问题讨论】:
标签: php utf-8 character file-get-contents