Spacedust
2
php
phpinfo
我需要检查我的PHP应用程序安装程序中是否启用了register_argc_argv.
我写了一个代码,但它不起作用.它总是说它已被禁用,而它已在php.ini中启用:
//register_argc_argv
echo "";
$ok=0;
$val="Disabled";
if(key_exists('PHP Core', $phpinfo))
{
if(key_exists('register_argc_argv', $phpinfo['PHP Core']))
{
if(is_array($phpinfo['coreKey']['register_argc_argv']))
{
if($phpinfo['coreKey']['register_argc_argv'][0]=="On")
{
$ok=1;
$val="Enabled";
}
}
else
{
if($phpinfo['coreKey']['register_argc_argv']=="On")
{
$ok=1;
$val="Enabled";
}
}
}
}
echo "$val$ok";
echo "\n";