step_2.php
2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<div class="box">
<div>
<div>
<div class="red_box" style='display:none' id='error_div'>
<img src="images/error.gif" width="16" height="15" />环境检测未通过,无法断续安装,请检测配制好环境再试!
</div>
<div class="gray_box">
<div class="in_box">
<?php
include("checking.php");
$config = array('version'=>'5.0','writable'=>array('.','data','logs','cache','protected/config/config.php','index.php','install','runtime'),'ext'=>array('gd','mysql/mysqli','curl'));
$checking = new Checking($config);
$info = $checking->check();
$class=array(true=>'success',false=>'fail');
?>
<b>环境检查:</b>
<p class="<?php echo $class[$info['version']];?>">PHP <?php echo PHP_VERSION;?></p>
<b>目录、文件权限检查:</b>
<?php
foreach ($info['writable'] as $key => $value) {?>
<p class="<?php echo $class[$value];?>"><?php echo($key)?></p>
<?php }?>
<b>扩展配置依赖:</b>
<?php
foreach ($info['ext'] as $key => $value) {?>
<p class="<?php echo $class[$value];?>"><?php echo($key)?></p>
<?php }?>
</div>
</div>
</div>
<p style="text-align:right"><input class="button" type="button" onclick="window.location.href = 'index.php?step=1';" value="上一步"><input class="button" type="button" value="下一步" onclick="check_license();" /></p>
</div>
</div>
<script type='text/javascript'>
//检查协议阅读状态
function check_license()
{
var passed = "<?php echo($class[$info['passed']])?>";
if(passed == "success")
{
window.location.href='index.php?step=3';
}
else
{
document.getElementById('error_div').style.display = '';
}
}
</script>