Apache中不推荐使用AddOutputFilterByType.
文档说明使用mod_filter可以使用相同的功能.
我目前正在使用
AddOutputFilterByType DEFLATE text/html
Run Code Online (Sandbox Code Playgroud)
使用mod_filter的等价物是什么?
我正在尝试稍微改变Google网站登录服务器端流程,如Google Developer's网站所述.
谷歌的gapi代码给出了以下错误消息:
未捕获的SecurityError:阻止具有原点" http://my-development-system.dev "的框架访问具有源" https://accounts.google.com " 的框架.请求访问的帧具有"http"协议,被访问的帧具有"https"协议.协议必须匹配.
我是否正确地说我的本地开发系统无法设置为使用https协议?
a)我是否正确地假设HTML5中的脚本格式正确<script src="script.js"></script>?
b)如何使用DOMDocument实现正确的结果?
$domImplementation = new \DOMImplementation ();
$docType = $domImplementation->createDocumentType ( 'html', '', '' );
$document = $domImplementation->createDocument ( 'http://www.w3.org/1999/xhtml', 'html', $docType );
$head = $document->createElement ( 'head' );
$script = $document->createElement ( 'script', '' );
$script->setAttribute ('src', 'script.js');
$head->appendChild ( $script );
Run Code Online (Sandbox Code Playgroud)
产生
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="script.js"/>
Run Code Online (Sandbox Code Playgroud)
HTML5验证器说
/>在非void HTML元素上使用的自闭语法().忽略斜杠并将其视为开始标记.