标签:html define add sql context ssl user var dir
<?php
$bd1 = "我是变量bd1";
$bd2 = "我是变量db2";
$bd3 = "我是变量db3";
//获取所有已经定义的变量并放入到data变量内
$data =get_defined_vars();
//输出
var_dump($data);
/*
*
* array (size=11)
‘_GET‘ =>
array (size=0)
empty
‘_POST‘ =>
array (size=0)
empty
‘_COOKIE‘ =>
array (size=0)
empty
‘_FILES‘ =>
array (size=0)
empty
‘_SERVER‘ =>
array (size=37)
‘PATH‘ => string ‘C:\Program Files (x86)\Common Files\Oracle\Java\javapath;D:\py\Scripts\;D:\py\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;D:\BtSoft\panel\script;D:\node\;D:\BtSoft\php\73;D:\BtSoft\php;D:\go\bin;D:\Git\cmd;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x‘... (length=653)
‘SYSTEMROOT‘ => string ‘C:\Windows‘ (length=10)
‘COMSPEC‘ => string ‘C:\Windows\system32\cmd.exe‘ (length=27)
‘PATHEXT‘ => string ‘.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW‘ (length=62)
‘WINDIR‘ => string ‘C:\Windows‘ (length=10)
‘_FCGI_SHUTDOWN_EVENT_‘ => string ‘2324‘ (length=4)
‘SCRIPT_NAME‘ => string ‘/index.php‘ (length=10)
‘REQUEST_URI‘ => string ‘/‘ (length=1)
‘QUERY_STRING‘ => string ‘‘ (length=0)
‘REQUEST_METHOD‘ => string ‘GET‘ (length=3)
‘SERVER_PROTOCOL‘ => string ‘HTTP/1.1‘ (length=8)
‘GATEWAY_INTERFACE‘ => string ‘CGI/1.1‘ (length=7)
‘REMOTE_PORT‘ => string ‘56629‘ (length=5)
‘SCRIPT_FILENAME‘ => string ‘D:/wwwroot/vueadmin/index.php‘ (length=29)
‘SERVER_ADMIN‘ => string ‘webmaster@example.com‘ (length=21)
‘CONTEXT_DOCUMENT_ROOT‘ => string ‘D:/wwwroot/vueadmin/‘ (length=20)
‘CONTEXT_PREFIX‘ => string ‘‘ (length=0)
‘REQUEST_SCHEME‘ => string ‘http‘ (length=4)
‘DOCUMENT_ROOT‘ => string ‘D:/wwwroot/vueadmin/‘ (length=20)
‘REMOTE_ADDR‘ => string ‘127.0.0.1‘ (length=9)
‘SERVER_PORT‘ => string ‘80‘ (length=2)
‘SERVER_ADDR‘ => string ‘127.0.0.1‘ (length=9)
‘SERVER_NAME‘ => string ‘vueadmin.cn‘ (length=11)
‘SERVER_SOFTWARE‘ => string ‘Apache/2.4.41 (Win32) OpenSSL/1.1.1c mod_fcgid/2.3.9a‘ (length=53)
‘SERVER_SIGNATURE‘ => string ‘‘ (length=0)
‘SystemRoot‘ => string ‘C:\Windows‘ (length=10)
‘HTTP_ACCEPT_LANGUAGE‘ => string ‘zh-CN,zh;q=0.9‘ (length=14)
‘HTTP_ACCEPT_ENCODING‘ => string ‘gzip, deflate‘ (length=13)
// ‘HTTP_ACCEPT‘ => string ‘text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9‘ (length=124)
// ‘HTTP_USER_AGENT‘ => string ‘Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Safari/537.36‘ (length=110)
// ‘HTTP_UPGRADE_INSECURE_REQUESTS‘ => string ‘1‘ (length=1)
// ‘HTTP_CONNECTION‘ => string ‘close‘ (length=5)
// ‘HTTP_HOST‘ => string ‘vueadmin.cn‘ (length=11)
// ‘FCGI_ROLE‘ => string ‘RESPONDER‘ (length=9)
// ‘PHP_SELF‘ => string ‘/index.php‘ (length=10)
// ‘REQUEST_TIME_FLOAT‘ => float 1587823518.637
// ‘REQUEST_TIME‘ => int 1587823518
// ‘_REQUEST‘ =>
// array (size=0)
// empty
// ‘_ENV‘ =>
// array (size=0)
// empty
// ‘GLOBALS‘ =>
// array (size=12)
// ‘_GET‘ =>
// array (size=0)
// empty
// ‘_POST‘ =>
// array (size=0)
// empty
// ‘_COOKIE‘ =>
// array (size=0)
// empty
// ‘_FILES‘ =>
// array (size=0)
// empty
// ‘_SERVER‘ =>
// array (size=37)
// ‘PATH‘ => string ‘C:\Program Files (x86)\Common Files\Oracle\Java\javapath;D:\py\Scripts\;D:\py\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;D:\BtSoft\panel\script;D:\node\;D:\BtSoft\php\73;D:\BtSoft\php;D:\go\bin;D:\Git\cmd;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x‘... (length=653)
// ‘SYSTEMROOT‘ => string ‘C:\Windows‘ (length=10)
// ‘COMSPEC‘ => string ‘C:\Windows\system32\cmd.exe‘ (length=27)
// ‘PATHEXT‘ => string ‘.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW‘ (length=62)
// ‘WINDIR‘ => string ‘C:\Windows‘ (length=10)
// ‘_FCGI_SHUTDOWN_EVENT_‘ => string ‘2324‘ (length=4)
// ‘SCRIPT_NAME‘ => string ‘/index.php‘ (length=10)
// ‘REQUEST_URI‘ => string ‘/‘ (length=1)
// ‘QUERY_STRING‘ => string ‘‘ (length=0)
// ‘REQUEST_METHOD‘ => string ‘GET‘ (length=3)
// ‘SERVER_PROTOCOL‘ => string ‘HTTP/1.1‘ (length=8)
// ‘GATEWAY_INTERFACE‘ => string ‘CGI/1.1‘ (length=7)
// ‘REMOTE_PORT‘ => string ‘56629‘ (length=5)
// ‘SCRIPT_FILENAME‘ => string ‘D:/wwwroot/vueadmin/index.php‘ (length=29)
// ‘SERVER_ADMIN‘ => string ‘webmaster@example.com‘ (length=21)
// ‘CONTEXT_DOCUMENT_ROOT‘ => string ‘D:/wwwroot/vueadmin/‘ (length=20)
// ‘CONTEXT_PREFIX‘ => string ‘‘ (length=0)
// ‘REQUEST_SCHEME‘ => string ‘http‘ (length=4)
// ‘DOCUMENT_ROOT‘ => string ‘D:/wwwroot/vueadmin/‘ (length=20)
// ‘REMOTE_ADDR‘ => string ‘127.0.0.1‘ (length=9)
// ‘SERVER_PORT‘ => string ‘80‘ (length=2)
// ‘SERVER_ADDR‘ => string ‘127.0.0.1‘ (length=9)
// ‘SERVER_NAME‘ => string ‘vueadmin.cn‘ (length=11)
// ‘SERVER_SOFTWARE‘ => string ‘Apache/2.4.41 (Win32) OpenSSL/1.1.1c mod_fcgid/2.3.9a‘ (length=53)
// ‘SERVER_SIGNATURE‘ => string ‘‘ (length=0)
// ‘SystemRoot‘ => string ‘C:\Windows‘ (length=10)
// ‘HTTP_ACCEPT_LANGUAGE‘ => string ‘zh-CN,zh;q=0.9‘ (length=14)
// ‘HTTP_ACCEPT_ENCODING‘ => string ‘gzip, deflate‘ (length=13)
// ‘HTTP_ACCEPT‘ => string ‘text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9‘ (length=124)
// ‘HTTP_USER_AGENT‘ => string ‘Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Safari/537.36‘ (length=110)
// ‘HTTP_UPGRADE_INSECURE_REQUESTS‘ => string ‘1‘ (length=1)
// ‘HTTP_CONNECTION‘ => string ‘close‘ (length=5)
// ‘HTTP_HOST‘ => string ‘vueadmin.cn‘ (length=11)
// ‘FCGI_ROLE‘ => string ‘RESPONDER‘ (length=9)
// ‘PHP_SELF‘ => string ‘/index.php‘ (length=10)
// ‘REQUEST_TIME_FLOAT‘ => float 1587823518.637
// ‘REQUEST_TIME‘ => int 1587823518
// ‘_REQUEST‘ =>
// array (size=0)
// empty
// ‘_ENV‘ =>
// array (size=0)
// empty
// ‘GLOBALS‘ =>
// &array< ‘bd1‘ => string ‘我是变量bd1‘ (length=15)
// ‘bd2‘ => string ‘我是变量db2‘ (length=15)
// ‘bd3‘ => string ‘我是变量db3‘ (length=15)
// ‘data‘ =>
// &array< ‘bd1‘ => string ‘我是变量bd1‘ (length=15)
// ‘bd2‘ => string ‘我是变量db2‘ (length=15)
// ‘bd3‘ => string ‘我是变量db3‘ (length=15)*/
<?php
$type = get_resource_type(fopen("flag.php",‘r‘));
var_dump($type);
/**
*string ‘stream‘ (length=6)
*/
<?php
$type = 1;
$type1 = ‘1‘;
$type2 = 1.01;
var_dump(gettype($type),gettype($type1),gettype($type2));
/**
* D:\wwwroot\vueadmin\index.php:5:string ‘integer‘ (length=7)
D:\wwwroot\vueadmin\index.php:5:string ‘string‘ (length=6)
D:\wwwroot\vueadmin\index.php:5:string ‘double‘ (length=6)
*/
标签:html define add sql context ssl user var dir
原文地址:https://www.cnblogs.com/death-satan/p/12797754.html