2013-07-03 114 views
0

我試圖使用include_onceinclude_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> 

有幫助嗎?

+0

發表您的emailform.php –

回答

0

你.html文件可能無法在UTF-8進行編碼。在編輯器中打開它,並確保它保存爲UTF-8

2

include_once()不適合你在做什麼。使用readfile()輸出HTML的內容:

readfile('yourhtml.html');