Home > php教程 > php手册 > body text

php (九) PHP预定义数组

WBOY
Release: 2016-06-21 08:48:39
Original
1267 people have browsed it

预定义数组:

    自动全局变量---超全局数组

    1.包含了来自web服务器,客户端,运行环境和用户输入的数据

    2.这些数组比较特别

    3.全局范围内自动生效,都可以直接使用这些数组

    4.用户不能自定义这些数组

    5.在函数中可以直接使用这些数组

 

$_GET //经由URL请求提交至脚本的变量

    $_POST //经由HTTP POST 方法提交脚本的变量

    $_REQUEST //经由get,post和cookie机制提交到脚本的变量,因此该数组并不值得我们信任和使用,尽量不去使用

    $_FILES //经由http post 文件上传而提交至脚本,文件上传  

    $_COOKIE  //会话控制

    $_SESSION //会话控制

    $_ENV  //执行环境提交至脚本

    $GLOBALS //只要是当前脚本有效的变量全在这里 ,数组键名为全局变量的名称  

    $_SERVER //变量有由web服务器设定或直接和当前脚本执行环境关联

 



Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!