1
A
回答
12
我想这不是file_get_contents
,而是您打印内容的方式。使用htmlspecialchars
在将内容放入HTML文档时,可以正确编码内容:
echo '<pre>', htmlspecialchars(file_get_contents('file')), '</pre>';
相关问题
- 1. file_get_contents和php代码
- 2. HiPHP读取使用的file_get_contents
- 3. PHP file_get_contents源代码位置
- 4. file_get_contents不返回php代码
- 5. PHP:的file_get_contents显示PHP代码
- 6. 重复PHP读取代码
- 7. textarea不读取php代码
- 8. PHP代码不读取URL
- 9. 使用file_get_contents(PHP)
- 10. php file_get_contents无法读取xml服务
- 11. 使用file_get_contents()从特定的div读取?
- 12. 如何用sprintf读取php代码
- 13. 在PHP中使用file_get_contents读取一个CSV
- 14. 做file_get_contents和readfile执行PHP代码?
- 15. PHP的file_get_contents不能得到HTML代码
- 16. phpmailer file_get_contents和动态php代码
- 17. 使用代理时PHP cURL与file_get_contents
- 18. 使用vb.net代码读取条码
- 19. 不可能使用file_get_html /的file_get_contents PHP代码如何解决
- 20. 使用PHP file_get_contents获取IP地址
- 21. 用PHP阅读源代码
- 22. 从数据库中读取php代码
- 23. PHP代码读取JSON文件
- 24. 网络主机不读取php代码
- 25. 从左到右读取的PHP代码
- 26. 使用java代码读取xl sheeet
- 27. 使用java代码读取xml节点
- 28. 使用javap的读取字节代码
- 29. 使用读取宏编译Lisp代码
- 30. 如何读取此数组代码?使用PHP
您得到的错误是什么?一些代码 – 2010-08-26 14:47:06
没有错误。只是返回的值似乎是空的。 – 2010-08-26 14:50:38