簡體   English   中英

用php保留html標簽導出Excel文件

[英]Export excel file with php keeping html tags

大家好

我的客戶想要並選擇導入 / 導出包含產品的excel文件。 在這個excel文件中,我有一個包含產品說明的單元格。 導入工作正常。

當他導入excel時,描述單元格包含html標記以:因此一個示例為:

<h1>Some title about the product</h1>
<p>Some text about the product <img src="absolute-path"/> also maybe a link</p>

我的問題是,當我想使用此描述字段導出此excel時,正在渲染html標簽,而我不希望這樣做。

有沒有一種方法可以像上面的代碼那樣逃避渲染並保留標簽

htmlspecialchars()解決了我的問題

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM