Home >php教程 >php手册 >php的超全局变量

php的超全局变量

WBOY
WBOYOriginal
2016-06-06 19:51:011362browse

1. $_GET $_POST $_REQUEST php的输入包括get,post,post文件上传 php code: $_REQUEST(get post 有同名的参数 则以post优先),$_GET ,$_POST $_SERVER $_SESSION $_COOKIE $_FILES 8. $GLOBALS $sb= ' zq ' ; test(); function test(){ var_dump($GLOBALS[ '

1. $_GET  $_POST  $_REQUEST

  php的输入包括get,post,post文件上传

  php code:  $_REQUEST(get & post 有同名的参数 则以post优先),$_GET ,$_POST   

$_SERVER

$_SESSION

$_COOKIE

$_FILES

8. $GLOBALS 

$sb=<span>'</span><span>zq</span><span>'</span><span>;
        test();
        function test(){
            var_dump($GLOBALS[</span><span>'</span><span>sb</span><span>'</span><span>]);
        }
        echo </span><span>'</span><span><hr></span><span>'</span><span>;
        $obj_zq </span>= <span>new</span><span> zq();
        $obj_zq</span>-><span>test();
        </span><span>class</span><span> zq{
            </span><span>public</span><span> function test(){
                var_dump($GLOBALS[</span><span>'</span><span>sb</span><span>'</span><span>]);
            }
        }</span>

 

 

 

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