【发布时间】:2015-07-13 09:34:10
【问题描述】:
我正在尝试使用 PHP 插入 Gist 的嵌入,如下所示:
<?php
echo "<script src='https://gist.github.com/schacon/4277.js'></script>";
?>
但是,查看控制台,返回如下错误:
在“文档”上执行“写入”失败:无法写入 从异步加载的外部脚本到文档中,除非 它是显式打开的。
我也试过了:
echo "<iframe src='https://gist.github.com/schacon/4277.js'></iframe>";
和:
echo "<embed src='https://gist.github.com/schacon/4277.js'></embed>";
但是两者都返回了:
拒绝在 a 中显示“https://gist.github.com/schacon/4277.js” 框架,因为它将“X-Frame-Options”设置为“拒绝”。
我该如何向他展示要点?还是不是这样?
对不起,我的英语不好。
【问题讨论】: