首頁 > 後端開發 > php教程 > php与http(php预约义变量)

php与http(php预约义变量)

WBOY
發布: 2016-06-13 13:03:24
原創
1035 人瀏覽過

php与http(php预定义变量)
var_dump($_SERVER['REQUEST_URI']);
var_dump($this->request->getRequestType());
var_dump($this->request->getIsAjaxRequest());

//打印信息
string(87) "/oms07/index.php?r=preShow/searchFails&idcName=JX&fromTime=2012-02-29&toTime=2012-02-29"
string(3) "GET"
bool(false)


PHP provides a large number of predefined variables to all scripts. The variables represent everything from external variables to built-in environment variables, last error messages to last retrieved headers.

    Superglobals ― Superglobals are built-in variables that are always available in all scopes
    $GLOBALS ― References all variables available in global scope
    $_SERVER ― Server and execution environment information
    $_GET ― HTTP GET variables
    $_POST ― HTTP POST variables
    $_FILES ― HTTP File Upload variables
    $_REQUEST ― HTTP Request variables
    $_SESSION ― Session variables
    $_ENV ― Environment variables
    $_COOKIE ― HTTP Cookies
    $php_errormsg ― The previous error message
    $HTTP_RAW_POST_DATA ― Raw POST data
    $http_response_header ― HTTP response headers
    $argc ― The number of arguments passed to script
    $argv ― Array of arguments passed to script


相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板