Php 未声明如何修复HTML文档的字符编码

Php 未声明如何修复HTML文档的字符编码,php,html,mysql,Php,Html,Mysql,我的网站在localhost中运行,没有任何错误;但是,当我将我的站点添加到CPpanel并运行members.php页面时(显示白色背景)。在控制台中查看页面时,会显示以下错误消息: The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document conta

我的网站在
localhost
中运行,没有任何错误;但是,当我将我的站点添加到
CPpanel
并运行
members.php
页面时(显示白色背景)。

在控制台中查看页面时,会显示以下错误消息:

The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol.
检查图元时,仅显示以下几行:

<div style="clear:both;"></div>


    </div>
</div>
</body>
</html>

标题中有类似的内容吗?您对文件进行utf-8编码,而不是utf-8编码

<meta http-equiv="content-type" content="text/html; charset=utf-8" />

从您得到的错误中,请将此添加到您的


这里可以回答吗@Tje请尝试第二个选项(我编辑了我的答案)相同的白色页面。没有更改任何内容。@Tje是
members.php
唯一存在此问题的页面?所有其他页面都可以吗?是的,其他页面都可以。只有在members.php中才会出现这种情况。thanks@Tje好啊
members.php
页面中是否包含其他文件?
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-5"> 
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<HEAD>

    <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
    <meta content="utf-8" http-equiv="encoding">

<title> Your Title</title>
</HEAD>
<BODY>
....
header('Content-type: text/html; charset=utf-8');