超全局变量
超全局变量–超全局变量是全部作用域中始终可用的内置变量
$globals
1一个包含了全部变量的全局组合数组。变量的名字就是数组的键。
function test() {$foo = "local variable";echo '$foo in gl流体动力学obal scope: ' . $globals["foo"] . "\n";echo '$foo in current scope: ' . $foo . "\n";}$foo = "example content";test();?>以上例程的输出类似于:$foo in global scope躲避的近义词: example content$foo in current scope: local variable
$_rver
echo "";var_dump($_rver);output:array (size=35)'http_host' => string 'localhost' (length=9)'http_connection' => string 'keep-alive' (length=10)'http_upgrade_incure_requests' => string '1' (length=1)'http_ur_agent' => string 'mozilla/5.0 (windows nt 10.0; wow64) applewebkit/537.36 (khtml, like gecko) chrome/53.0.2785.104 safari/537.36 core/1.53.3538.400 qqbrowr/9.6.12501.400' (length=153)'http_accept' => string 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' (length=74)'http_referer' => string 'https://localhost/test/' (length=22)'http_accept_encoding' => string 'gzip, deflate, sdch' (length=19)'http_accept_language' => string 'zh-cn,zh;q=0.8' (length=14)'path' => string '%appcan_path%;d:\work\python2.7\;d:\work\python2.7\scripts;c:\programdata\oracle\java\javapath;c:\windows\system32;c:\windows;c:\windows\system32\wbem;c:\windows\system32\windowspowershell\v1.0\;d:\wamprver\mysql\bin;d:\work\java\tomcat\bin;d:\work\mozilla firefox\firefox.exe;d:\work\phantomjs\bin;d:\work\chormedriver;c:\windows\system32\config\systemprofile\.dnx\bin;c:\program files\microsoft dnx\dnvm\;c:\program files\microsoft sql rver0\tools\binn\;d:\wamprver\php;c:\programdata\comportup\bi'... (length=607)'systemroot' => string 'c:\windows' (length=10)'comspec' => string 'c:\windows\system32\cmd.exe' (length=27)'pathext' => string '.com;.exe;.bat;.cmd;.vbs;.vbe;.js;.j;.wsf;.wsh;.msc' (length=53)'windir' => string 'c:\windows' (length=10)'rver_signature' => string '' (length=0)'rver_software' => string 'apache/2.4.18 (win64) openssl/1.0.2g php/5.6.19' (length=47)'rver_name' => string 'localhost' (length=9)'rver_addr' => string '::1' (length=3)'rver_port' => string '80' (length=2)'remote_addr' =&男枪泳池派对gt; string '::1' (length=3)'document_root' => string 'd:/wamprver/www' (length=17)'request_scheme' => string 'http' (length=4)'context_prefix' => string '' (length=0)'context_document_root' => string 'd:/wamprver/www' (length=17)'rver_admin' => string 'admin@example.com' (length=17)'script_filename' => string 'd:/wamprver/www/test/$_rver.php' (length=35)'remote_port妇孺皆知的近义词' => string '57305' (length=5)'gateway_interface' => string 'cgi/1.1' (length=7)'rver_protocol' => string 'http/1.1' (length=8)'request_method' => string 'get' (length=3)'query_string' => string '' (length=0)'requ浙江省大学est_uri' => string '/test/$_rver.php' (length=18)'script_name' => string '/test/$_rver.php' (length=18)'php_lf' => string '/test/$_rver.php' (length=18)'request_time_float' => float 1510122616.201'request_time' => int 1510122616
本文发布于:2023-04-07 05:10:56,感谢您对本站的认可!
本文链接:https://www.wtabcd.cn/fanwen/zuowen/ffab1d5b88f85e1b92ed65e505a22078.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文word下载地址:PHP学习:预定义变量详情.doc
本文 PDF 下载地址:PHP学习:预定义变量详情.pdf
留言与评论(共有 0 条评论) |