欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

php与http(php预约义变量)

程序员文章站 2022-06-07 10:23:13
...
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与http(php预约义变量)

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。

相关文章

相关视频