我有PHP 3.2.1並且想要解碼html標籤,例如<
或>
我知道PHP 4及以上版本的html_entity_decode,但不知道您對PHP 3有何看法?html_entity_decode for php 3
0
A
回答
3
的首選解決方案是升級PHP所以它不會讓你的頭髮都豎起來了,當你聽到的是什麼版本?
除此之外,你就不得不實現自己的給定一個list of HTML entities,一個循環和str_replace
。即使那樣你也會遇到另一個可能的問題:編碼(PHP 3不提供任何編碼轉換支持,所以如果你需要的話,你也必須編碼)。
1
如果您仍在使用大約10年前不再支持的PHP 3.2.1版本,那麼您正在做一些根本性錯誤的事情。在這樣一箇舊的,不受支持的基礎架構上運行應用程序是一個巨大的風險!
相關問題
- 1. php html_entity_decode如何使用
- 2. html_entity_decode()不起作用(PHP)
- 3. PHP中的html_entity_decode問題?
- 4. html_entity_decode爲小枝(opencart)
- 5. html_entity_decode終止?
- 6. html_entity_decode不解碼
- 7. PHP html_entity_decode不按預期解碼實體?
- 8. PHP的html_entity_decode和修剪混淆
- 9. PHP的html_entity_decode和HTML <a>標籤
- 10. html_entity_decode不解碼ASCII
- 11. html_entity_decode的POST/GET值
- 12. html_entity_decode工作不正常
- 13. bash_completion for Rails 3
- 14. html_entity_decode():字符集'ASCII」不支持
- 15. html_entity_decode characters like Yuml vs&yuml
- 16. 使用html_entity_decode顯示圖像
- 17. 同時使用stripslashes和html_entity_decode
- 18. FPDF中的html_entity_decode(使用tFPDF擴展)
- 19. 有沒有一個JavaScript的PHP的urldecode或html_entity_decode()的等價物?
- 20. PHP清理功能無法刪除'(html_entity_decode不工作?)
- 21. 數字HTML實體60和62的PHP html_entity_decode()例外
- 22. 奇怪的字符()出現做html_entity_decode
- 23. Rails 3:rollback for after_create
- 24. Python 3 For/While Loops
- 25. Pdf Writer for Rails 3
- 26. Ajax for Rails 3:onchange
- 27. 如何將html_entity_decode添加到數組中?
- 28. ST_asGeoJson for Multilinestring in php for leaflet
- 29. 用特殊字符(html_entity_decode,iconv等)努力
- 30. php mysql for循環
哇,一個化石! –
也許你可能會想到更新你的PHP版本... –
[PHP_Compat](http://pear.php.net/package/PHP_Compat/redirected)或[upgradephp](http://upgradephp.berlios.de/)或查看手冊評論部分。 – mario