![](/img/trans.png)
[英]How to display HTML5 convert of a PDF on page without using an IFrame?
[英]How to display PHP page from another server on an html without iFrame?
我有以下iFrame HTML:
<html>
<iframe src="page.php" id="ifrm" height = 100% width = 100% ></iframe>
</table>
</html>
我用它在HTML页面内显示PHP。
但是,iframe让我很难受。 如果不使用iFrame,还有其他解决方案吗?
我基本上需要HTML页面在不更改浏览器URL的情况下显示php页面。
顺便说一句:两个页面都在不同的服务器上。
谢谢!
您可以尝试使用file_get_contents
读取文件,然后打印:
<?php
$sContent = file_get_contents('page.php'); //Replace 'page.php' with the full URI to the pages you want to show
print ($sContent);
?>
尽管并非总是如此,这将适用于大多数服务器设置。
您可以使用函数file_get_contents(' http://urlforsite.com/page ')
$externalWebsite = 'http://externalsite.com/page';
$externalContent = file_get_contents($externalWebsite);
echo $externalContent;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.