我正在尝试嵌入一些像这样的站点
<iframe src="http://somesite.com"></iframe>但是我得到了这个错误。
Refused to display in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'有没有办法修复这个错误?
我需要嵌入的站点不是我的
发布于 2016-12-21 18:46:34
您可以要求站点所有者更改您的域的访问权限,或者您可以尝试使用curl或file_get_contents从php端更改访问权限。
发布于 2017-04-09 07:58:12
这会起到作用,它会获取远程站点的内容并粘贴它。
<?php
$url = "https://google.com";
echo '<base href="'.$url.'" />' . file_get_contents($url);
?>https://stackoverflow.com/questions/39979992
复制相似问题