本文整理汇总了PHP中DataUtil::getBooleanIniValue方法的典型用法代码示例。如果您正苦于以下问题:PHP DataUtil::getBooleanIniValue方法的具体用法?PHP DataUtil::getBooleanIniValue怎么用?PHP DataUtil::getBooleanIniValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataUtil
的用法示例。
在下文中一共展示了DataUtil::getBooleanIniValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _securityanalyzer
/**
* Get security analyzer data.
*
* @return array data
*/
private function _securityanalyzer()
{
$data = array();
// check for magic_quotes
$data['magic_quotes_gpc'] = \DataUtil::getBooleanIniValue('magic_quotes_gpc');
// check for register_globals
$data['register_globals'] = \DataUtil::getBooleanIniValue('register_globals');
// check for config.php beeing writable
$data['config_php'] = (bool) is_writable('config/config.php');
// check for .htaccess in temp directory
$temp_htaccess = false;
$tempDir = $GLOBALS['ZConfig']['System']['temp'];
if ($tempDir) {
// check if we have an absolute path which is possibly not within the document root
$docRoot = \System::serverGetVar('DOCUMENT_ROOT');
if (\StringUtil::left($tempDir, 1) == '/' && strpos($tempDir, $docRoot) === false) {
// temp dir is outside the webroot, no .htaccess file needed
$temp_htaccess = true;
} else {
if (strpos($tempDir, $docRoot) === false) {
$ldir = dirname(__FILE__);
$p = strpos($ldir, DIRECTORY_SEPARATOR . 'system');
// we are in system/Admin
$b = substr($ldir, 0, $p);
$filePath = $b . '/' . $tempDir . '/.htaccess';
} else {
$filePath = $tempDir . '/.htaccess';
}
$temp_htaccess = (bool) file_exists($filePath);
}
} else {
// already customized, admin should know about what he's doing...
$temp_htaccess = true;
}
$data['temp_htaccess'] = $temp_htaccess;
$data['scactive'] = (bool) \ModUtil::available('SecurityCenterModule');
// check for outputfilter
$data['useids'] = (bool) (\ModUtil::available('SecurityCenterModule') && System::getVar('useids') == 1);
$data['idssoftblock'] = System::getVar('idssoftblock');
return $data;
}