Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.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
Apache 如何在iframe中显示网站?_Apache_.htaccess_Iframe_Drupal_Web Deployment - Fatal编程技术网

Apache 如何在iframe中显示网站?

Apache 如何在iframe中显示网站?,apache,.htaccess,iframe,drupal,web-deployment,Apache,.htaccess,Iframe,Drupal,Web Deployment,我在将我的网站显示到框架中以显示单击地图时遇到问题。错误是:“拒绝在帧中显示“”,因为它将“X-frame-Options”设置为“SAMEORIGIN”。“但我没有任何禁止的规定。” 我正在使用Drupal 您能给我一些建议吗?X-Frame\u选项是header选项,在任何输出开始之前,应该使用header函数发送它。比如: <?php header('X-Frame-Options: GOFORIT'); ?> drupal_add_http_header('X-Frame-

我在将我的网站显示到框架中以显示单击地图时遇到问题。错误是:“拒绝在帧中显示“”,因为它将“X-frame-Options”设置为“SAMEORIGIN”。“但我没有任何禁止的规定。”

我正在使用Drupal


您能给我一些建议吗?

X-Frame\u选项是header选项,在任何输出开始之前,应该使用header函数发送它。比如:

<?php header('X-Frame-Options: GOFORIT'); ?>
drupal_add_http_header('X-Frame-Options', 'GOFORIT');
查看功能描述下面的注释

更新:

查看以下文档:

可能您必须指定外部原点,如它所述:

X-Frame-Options: ALLOW-FROM https://example.com/

你好!谢谢你的回答!我已将此函数添加到bootstrap.inc的末尾。但现在它仍然显示一个错误:“加载“”时遇到无效的'X-Frame-Options'头:'GOFORIT'不是可识别的指令。该头将被忽略。”并且此()测试仍然显示“X-Frame-Options:SAMEORIGIN头”