2013-09-29 75 views
0

Im將tex的內容存儲在textaera中,然後將內容發佈到另一個頁面。錯誤顯示發佈的html

第二頁應該簡單地打印出html,就好像它直接寫在那個頁面中一樣。

內容顯示,除了到處是「在HTML,它就會被打印成\」(在圖像源和IDS爲例)

爲什麼會出現這種情況,我能做些什麼來避免呢?

的HTML:

<textarea name="message" rows="10" cols="34"><table><tr> 
     <td style="color: #333333;table-layout:fixed;text-align:left;vertical-align:top;" id="imgCell3"><img src="https://www.pnrbuilder.com/_images/itinerary/airlines_AC.gif"><br> 
     AC# 7469</td> 
     <td class="itinCell">06:30 AM on Tue, October 22, 2013<br> 
     Newark/Elizabeth, NJ (EWR): Newark Liberty Intl. Airport</td> 
     <td class="itinCell">8:03 AM on Tue, October 22, 2013 <br> 
     Mississauga,&nbsp;Ontario,&nbsp;Canada (YYZ): Toronto Pearson Intl. Airport</td> 
     <br> 
    </tr> 
    </table></textarea><br /><br /> 
<input type="submit" value="POST"/> 

在PHP:

echo '<strong>This is the email content as it was posted to the page:</strong><br>'.$_POST['message'].'<br><br><br>'; 

由PHP回顯所得源代碼:

<strong>This is the email content as it was posted to the page:</strong><br><table><tr> 
     <td style=\"color: #333333;table-layout:fixed;text-align:left;vertical-align:top;\" id=\"imgCell3\"><img src=\"https://www.pnrbuilder.com/_images/itinerary/airlines_AC.gif\"><br> 
     AC# 7469</td> 
     <td class=\"itinCell\">06:30 AM on Tue, October 22, 2013<br> 
     Newark/Elizabeth, NJ (EWR): Newark Liberty Intl. Airport</td> 
     <td class=\"itinCell\">8:03 AM on Tue, October 22, 2013 <br> 
     Mississauga, Ontario, Canada (YYZ): Toronto Pearson Intl. Airport</td> 
     <br> 
    </tr> 
    </table> 

回答