Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/250.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何从iframe绕过HTTP链接到HTTPS_Php_Apache_Http_Iframe_Https - Fatal编程技术网

Php 如何从iframe绕过HTTP链接到HTTPS

Php 如何从iframe绕过HTTP链接到HTTPS,php,apache,http,iframe,https,Php,Apache,Http,Iframe,Https,我已经在我的域中创建了一个iframe,我正在调用另一个网站进入该iframe 因此,在所有链接按照http重定向之前,它工作正常。但当它重定向到其域的https服务器时,它显示的是损坏的图像页面 那么,有谁能给我一些建议,什么是最好的解决方案呢 <?php header("access-control-allow-origin: *"); include "views/***/header.html"; ?> <section> <?php if(

我已经在我的域中创建了一个iframe,我正在调用另一个网站进入该iframe

因此,在所有链接按照http重定向之前,它工作正常。但当它重定向到其域的https服务器时,它显示的是损坏的图像页面

那么,有谁能给我一些建议,什么是最好的解决方案呢

<?php 

header("access-control-allow-origin: *");
include "views/***/header.html"; 
?>

<section>
    <?php if($this->page_name=='content'){ ?>
    <div>
        <iframe  id='iframe2' src="http://content.******.com/?s=jd" frameborder="0" style="overflow: hidden; height: 900px; width: 100%;scrolling=no;"></iframe>
    </div>
  <?php }
   else if($this->page_name=='recruiter'){ ?>
    <div>
        <iframe id='iframe2' src="http://recruiter.*****.com/v2/ecom/index.html?s=jd" frameborder="0" style="overflow: hidden; height: 900px; width: 100%;scrolling=no;"></iframe>
    </div>
  <?php } ?>
</section>
<?php include "views/***/footer.html"; ?>


这段代码不会有多大帮助,因为所有的事情都发生在iframe内部

嗨,哈桑,为什么你需要这个代码。然后我给了代码片段检查,图像本身是https吗?某些浏览器不允许在使用httpsNo时从另一个域/普通http加载图像。这些不是图像。这是一个页面,应该在单击某个定义链接之后出现。但是链接是https。所以它不能绕过这个域。所以显示的是破损的页面。希望你能明白。嗨,哈桑,为什么你需要这个代码。然后我给了代码片段检查,图像本身是https吗?某些浏览器不允许在使用httpsNo时从另一个域/普通http加载图像。这些不是图像。这是一个页面,应该在单击某个定义链接之后出现。但是链接是https。所以它不能绕过这个域。所以显示的是破损的页面。希望你能得到。