2017-11-15 26 views
0

$_SERVER["REQUEST_METHOD"]は、デフォルトで「取得」に設定されていますか?REQUEST_METHODデフォルト

このコード

<?php echo $_SERVER["REQUEST_METHOD"]; ?> 

出力「GET」それは、デフォルトでは他のタグ(<html>/<form>/<?php ?>

答えて

1

で空のファイルで、ブラウザによって送信された要求は常にGETある場合であっても。これを見にhere

を見てみましょう:

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 -- 
    > 
関連する問題