您好我使用codeigniter和bootstrap开发一个网站,然后在我的管理页面中上传YouTube网址,并使用iframe和加载该网址在我的视图页中获取该网址。但YouTube视频没有显示当我检查网站上的错误显示像拒绝在我的网站上显示YouTube视频
拒绝在该框架中显示“https://www.youtube.com/watch?v=7Ct59FQIbAU”,因为它设置“X-框架 - 选项”到“SAMEORIGIN”。 广告:522 GET https://www.youtube.com/watch?v=7Ct59FQIbAU网:: ERR_BLOCKED_BY_RESPONSE
当我检查这个网站的网址是显示但视频没有显示。这是该网站的网址www.clicx.in/pixelerror
在我的本地服务器及其工作
视图代码
<div class="container">
<div class="row">
<?php foreach($advertisement as $ad) { ?>
<!-- 4:3 aspect ratio -->
<div class="embed-responsive embed-responsive-4by3">
<iframe class="embed-responsive-item" src="<?php echo $ad->url?>"></iframe>
</div>
<?php }?>
</div>
</div>
YouTube只允许非常特定的网址嵌入其他网站。他们会在每个视频页面上为您提供该URL。 – ceejayoz
@ceejoz,为您的评论...但我无法清楚地了解 – pixel