} if (!empty($check['mysql_connect']) || !empty($check['pdo_mysql'])) { $result['iscontinue'] = true; } else { $result['iscontinue'] = false; } unset($check['mysql_connect']); unset($check['pdo_mysql']); foreach ($check as $condition) { if (empty($condition)) { $result['iscontinue'] = false; } } $result['chk_dir'] = array('/'); foreach ($result['chk_dir'] as $dir) { if (!local_writeable(IA_ROOT . $dir)) { $result['chk_' . md5($dir)] = '<font color=red>[×]不可写</font>'; $result['iscontinue'] = false; } else { $result['chk_' . md5($dir)] = '<font color=green>[√]可写</font>'; } } tpl_install_check_env($result); } if ($action == 'db') { if ($ispost) { if (isset($_POST['back'])) { setcookie('action', 'env'); header('location: ?refresh'); exit; }
$ret['php']['asp_tags']['value'] = '<span class="glyphicon glyphicon-remove text-danger"></span>'; $ret['php']['asp_tags']['class'] = 'danger'; $ret['php']['asp_tags']['failed'] = true; $ret['php']['asp_tags']['remark'] = '请禁用可以使用ASP 风格的标志,配置php.ini中asp_tags = Off'; } $ret['write']['root']['ok'] = local_writeable(IA_ROOT . '/'); if ($ret['write']['root']['ok']) { $ret['write']['root']['value'] = '<span class="glyphicon glyphicon-ok text-success"></span>'; $ret['write']['root']['class'] = 'success'; } else { $ret['write']['root']['value'] = '<span class="glyphicon glyphicon-remove text-danger"></span>'; $ret['write']['root']['class'] = 'danger'; $ret['write']['root']['failed'] = true; $ret['write']['root']['remark'] = '本地目录无法写入, 将无法使用自动更新功能, 系统无法正常运行. <a href="http://bbs.we7.cc/">详情</a>'; } $ret['write']['data']['ok'] = local_writeable(IA_ROOT . '/data'); if ($ret['write']['data']['ok']) { $ret['write']['data']['value'] = '<span class="glyphicon glyphicon-ok text-success"></span>'; $ret['write']['data']['class'] = 'success'; } else { $ret['write']['data']['value'] = '<span class="glyphicon glyphicon-remove text-danger"></span>'; $ret['write']['data']['class'] = 'danger'; $ret['write']['data']['failed'] = true; $ret['write']['data']['remark'] = 'data目录无法写入, 将无法写入配置文件, 系统无法正常安装. '; } $ret['continue'] = true; foreach ($ret['php'] as $opt) { if ($opt['failed']) { $ret['continue'] = false; break; }
} else { $ret['write']['root']['value'] = '<span class="glyphicon glyphicon-remove text-warning"></span>'; $ret['write']['root']['class'] = 'warning'; $ret['write']['root']['remark'] = '本地目录无法写入, 将无法使用自动更新功能, 系统无法正常运行. <a href="http://bbs.microb.cn/">详情</a>'; } $ret['write']['conf']['ok'] = local_writeable(MB_ROOT . '/source/Data'); if ($ret['write']['conf']['ok']) { $ret['write']['conf']['value'] = '<span class="glyphicon glyphicon-ok text-success"></span>'; $ret['write']['conf']['class'] = 'success'; } else { $ret['write']['conf']['value'] = '<span class="glyphicon glyphicon-remove text-danger"></span>'; $ret['write']['conf']['class'] = 'danger'; $ret['write']['conf']['failed'] = true; $ret['write']['conf']['remark'] = 'Conf目录无法写入, 将无法写入配置文件, 系统无法正常安装. '; } $ret['write']['data']['ok'] = local_writeable(MB_ROOT . '/source/Data'); if ($ret['write']['data']['ok']) { $ret['write']['data']['value'] = '<span class="glyphicon glyphicon-ok text-success"></span>'; $ret['write']['data']['class'] = 'success'; } else { $ret['write']['data']['value'] = '<span class="glyphicon glyphicon-remove text-danger"></span>'; $ret['write']['data']['class'] = 'danger'; $ret['write']['data']['failed'] = true; $ret['write']['data']['remark'] = 'Data目录无法写入, 将无法写入系统运行时临时文件, 系统无法正常运行. '; } $ret['continue'] = true; foreach ($ret['php'] as $opt) { if ($opt['failed']) { $ret['continue'] = false; break; }