Php include_once将html作为文本包含

Php include_once将html作为文本包含,php,Php,我试图使用include\u一次 <?php include_once "emailform.html"; ?> 但PHP并没有将其包含在html代码中,而是将其作为简单文本包含,输出如下所示 ��<div class="well widget"> <div class="widget-header"> <h3 class="title">'O1/H�� ,3 �' F'E</h3> �� 'O1/H�� ,3.�' 费

我试图使用
include\u一次

<?php include_once "emailform.html"; ?>

但PHP并没有将其包含在html代码中,而是将其作为简单文本包含,输出如下所示

��<div class="well widget"> <div class="widget-header"> <h3 class="title">'O1/H�� ,3 �' F'E</h3> 
��  'O1/H�� ,3.�' 费
有什么帮助吗?

include_once()
不适用于您正在做的事情。使用
readfile()
输出html的内容:

readfile('yourhtml.html');
include_once()
不适用于您正在做的事情。使用
readfile()
输出html的内容:

readfile('yourhtml.html');

您的.html文件可能未编码为UTF-8。在编辑器中打开它,并确保它保存为UTF-8

您的.html文件可能未编码为UTF-8。在编辑器中打开它并确保它保存为UTF-8

可能包含HTML内容的更好方法是可能包含HTML内容的更好方法是我认为你必须摆脱我认为你必须摆脱发布你的emailform.phppost your emailform.php