此行
echo "document.write('". $output ."');\r\n";
原因
解析器阻止,跨站点(即不同的eTLD + 1)脚本
$output
从其他网站加载js文件
$output =ob_get_contents();
当我将其注释掉时,错误消失了,但是该功能不再起作用
我该如何更换?
我替换为
echo "document.currentScript.insertAdjacentHTML('beforebegin', '". $output ."');\r\n";
而且有效!