簡體   English   中英

REQUEST_METHOD默認

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM