加载不同域名页面 跨域问题解决

通过PHP抓取页面在显示出来

<?php
$url
= 'http://www.baidu.com'; $content = file_get_contents($url); $content = str_replace('/static/',$url .'/static/',$content); $content = str_replace('/index.php',$url.'/index.php',$content); echo $content;

在页面点击功能后 控制台还会产生跨域报错
但是这样至少可以保证页面点击效果或者弹出层可以正常使用

猜你喜欢

转载自www.cnblogs.com/phper8/p/12093219.html
今日推荐