![](/img/trans.png)
[英]$_SERVER['REQUEST_METHOD'] evaluates to to 'GET' by default
[英]REQUEST_METHOD default
$_SERVER["REQUEST_METHOD"]
是否默认设置为'GET'?
这段代码
<?php echo $_SERVER["REQUEST_METHOD"]; ?>
即使它在没有其他标签的空文件中也输出'GET'( <html>
/ <form>
/ <?php ?>
)
默认情况下,浏览器发送的请求始终为GET
。 在这里看看
看这个:
17.3 FORM元素
<!ELEMENT FORM - - (%block;|SCRIPT)+ -(FORM) -- interactive form --> <!ATTLIST FORM %attrs; -- %coreattrs, %i18n, %events -- action %URI; #REQUIRED -- server-side form handler -- method (GET|POST) GET -- HTTP method used to submit the form-- enctype %ContentType; "application/x-www-form-urlencoded" accept %ContentTypes; #IMPLIED -- list of MIME types for file upload -- name CDATA #IMPLIED -- name of form for scripting -- onsubmit %Script; #IMPLIED -- the form was submitted -- onreset %Script; #IMPLIED -- the form was reset -- accept-charset %Charsets; #IMPLIED -- list of supported charsets -- >
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.