[英]php fetch file content and print it out formatted
如何打印格式化的HTML文件? 这是我当前的代码:
echo htmlspecialchars(file_get_contents($url));
但是结果看起来很丑陋,全部粘在一起,没有空格,没有标签。 有什么办法可以完全像原始文件一样打印文件?
预标签将起作用。
<pre>
<?php echo htmlspecialchars(file_get_contents($url)); ?>
</pre>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.