我試圖使用include_once
像include_once包括HTML文本
<?php include_once "emailform.html"; ?>
但不是包括它的HTML代碼,PHP是包括其作爲簡單的文字和輸出看起來像
��<div class="well widget"> <div class="widget-header"> <h3 class="title">'O1/H�� ,3 �' F'E</h3>
有幫助嗎?
我試圖使用include_once
像include_once包括HTML文本
<?php include_once "emailform.html"; ?>
但不是包括它的HTML代碼,PHP是包括其作爲簡單的文字和輸出看起來像
��<div class="well widget"> <div class="widget-header"> <h3 class="title">'O1/H�� ,3 �' F'E</h3>
有幫助嗎?
你.html文件可能無法在UTF-8進行編碼。在編輯器中打開它,並確保它保存爲UTF-8。
include_once()
不適合你在做什麼。使用readfile()
輸出HTML的內容:
readfile('yourhtml.html');
可能是一個更好的辦法,包括HTML內容http://php.net/manual/en/function.file-get-contents.php
,我認爲你必須擺脫BOM
發表您的emailform.php –