Home  >  Article  >  php教程  >  php 超级全局变量收集

php 超级全局变量收集

WBOY
WBOYOriginal
2016-05-25 16:46:15929browse

php 超全局变量$globals:包含一个引用指向每个当前脚本的全局范围内有效的变量,该数组的键标为全局变量的 名称,从 php 3 开始存在 $globals 数组. 

$_server:变量由 web 服务器设定或者直接与当前脚本的执行环境相关联,类似于旧数组 $http_server_vars 数组(依然有效,但反对使用). 

$_get:经由 http get 方法提交至脚本的变量.

$_post:经由 http post 方法提交至脚本的变量. 

$_cookie:经由 http cookies 方法提交至脚本的变量. 

$_files:经由 http post 文件上传而提交至脚本的变量. 

文件上传表单中要有 enctype="multipart/form-data".

$_env:执行环境提交至脚本的变量.

$_request:经由 get,post 和 cookie 机制提交至脚本的变量,因此该数组并不值得信任,所有包含在该数组中的变量的存在与否以及变量的顺序均按照 php.ini 中的 variables_order 配置指示来定义,该数组没有直接模拟 php 4.1.0 的早期版本,参见 import_request_variables(). 

注意:自 php 4.3.0 起,$_files 中的文件信息不再存在于 $_request 中。 

$_session :当前注册给脚本会话的变量。

教程链接:

随意转载~但请保留教程地址★

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn