PHP错误:未声明HTML文档的字符编码

时间:2014-05-21 00:18:57

标签: php html character-encoding

这是我试图创建的PHP页面的HTML主体。

<!DOCTYPE html>
<meta charset="utf-8">
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta content="utf-8" http-equiv="encoding" />
</head>
<body>
<?php

echo <<< _END
<form action="create_strike.php" method="post">
<pre>
Device ID: <input type="text" name="device_id" />
Latitude: <input type="text" name="latitude" />
Longitude: <input type="text" name="longitude" />
<input type="submit" value="Create Strike!" />
</pre>
</form>
_END;
?>
</body>
</html>

我仍然收到错误&#34;未声明HTML文档的字符编码。如果文档包含US-ASCII范围之外的字符,则文档将在某些浏览器配置中使用乱码文本进行渲染。必须在文档或传输协议中声明页面的字符编码。&#34;

如您所见,我已根据this threadthis other thread的建议添加了标题。但仍然没有用。有人能告诉我我做错了吗?

0 个答案:

没有答案