step2.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8" />
  5. <title><?php echo $Title; ?> - <?php echo $Powered; ?></title>
  6. <link rel="stylesheet" href="./css/install.css?v=9.0" />
  7. </head>
  8. <body>
  9. <div class="wrap">
  10. <?php require './templates/header.php';?>
  11. <section class="section">
  12. <div class="step">
  13. <ul>
  14. <li class="current"><em>1</em>检测环境</li>
  15. <li><em>2</em>创建数据</li>
  16. <li><em>3</em>完成安装</li>
  17. </ul>
  18. </div>
  19. <div class="server">
  20. <table width="100%">
  21. <tr>
  22. <td class="td1">环境检测</td>
  23. <td class="td1" width="25%">推荐配置</td>
  24. <td class="td1" width="25%">当前状态</td>
  25. <td class="td1" width="25%">最低要求</td>
  26. </tr>
  27. <tr>
  28. <td>操作系统</td>
  29. <td>类UNIX</td>
  30. <td><span class="correct_span">&radic;</span> <?php echo $os; ?></td>
  31. <td>不限制</td>
  32. </tr>
  33. <tr>
  34. <td>服务器环境</td>
  35. <td>apache/nginx</td>
  36. <td><span class="correct_span">&radic;</span> <?php echo $_SERVER['SERVER_SOFTWARE']; ?></td>
  37. <td>apache2.0以上/nginx1.6以上</td>
  38. </tr>
  39. <tr>
  40. <td>PHP版本</td>
  41. <td>><?php echo PHP_EDITION; ?></td>
  42. <td><span class="correct_span">&radic;</span> <?php echo $phpv; ?></td>
  43. <td><?php echo PHP_EDITION; ?>以上</td>
  44. </tr>
  45. <tr>
  46. <td>附件上传</td>
  47. <td>>2M</td>
  48. <td><?php echo $uploadSize; ?></td>
  49. <td>不限制</td>
  50. </tr>
  51. <tr>
  52. <td>session</td>
  53. <td>开启</td>
  54. <td><?php echo $session; ?></td>
  55. <td>开启</td>
  56. </tr>
  57. <tr>
  58. <td>safe_mode</td>
  59. <td>基础配置</td>
  60. <td><?php echo $safe_mode; ?></td>
  61. <td>启用</td>
  62. </tr>
  63. <tr>
  64. <td>GD库</td>
  65. <td>必须开启</td>
  66. <td><?php echo $gd; ?></td>
  67. <td>1.0</td>
  68. </tr>
  69. <tr>
  70. <td>mysqli</td>
  71. <td>必须开启</td>
  72. <td><?php echo $mysql; ?></td>
  73. <td>启用</td>
  74. </tr>
  75. <tr>
  76. <td>curl_init</td>
  77. <td>必须扩展</td>
  78. <td><?php echo $curl; ?></td>
  79. <td>启用</td>
  80. </tr>
  81. <tr>
  82. <td>bcmath</td>
  83. <td>必须扩展</td>
  84. <td><?php echo $bcmath; ?></td>
  85. <td>启用</td>
  86. </tr>
  87. <tr>
  88. <td>openssl</td>
  89. <td>必须扩展</td>
  90. <td><?php echo $openssl; ?></td>
  91. <td>启用</td>
  92. </tr>
  93. <tr>
  94. <td>fileinfo</td>
  95. <td>必须扩展</td>
  96. <td><?php echo $finfo_open; ?></td>
  97. <td>启用</td>
  98. </tr>
  99. </table>
  100. <table width="100%">
  101. <tr>
  102. <td class="td1">目录、文件权限检查</td>
  103. <td class="td1" width="25%">推荐配置</td>
  104. <td class="td1" width="25%">写入</td>
  105. <td class="td1" width="25%">读取</td>
  106. </tr>
  107. <?php
  108. foreach($folder as $dir){
  109. $Testdir = APP_DIR.$dir;
  110. // echo $Testdir."<br/>";
  111. if(!is_file($Testdir)){
  112. if(!is_dir($Testdir)){
  113. dir_create($Testdir);
  114. }
  115. }
  116. if(testwrite($Testdir)){
  117. $w = '<span class="correct_span">&radic;</span>可写 ';
  118. }else{
  119. $w = '<span class="correct_span error_span">&radic;</span>不可写 ';
  120. $err++;
  121. }
  122. if(is_readable($Testdir)){
  123. $r = '<span class="correct_span">&radic;</span>可读' ;
  124. }else{
  125. $r = '<span class="correct_span error_span">&radic;</span>不可读';
  126. $err++;
  127. }
  128. ?>
  129. <tr>
  130. <td><?php echo $dir; ?></td>
  131. <td>读写</td>
  132. <td><?php echo $w; ?></td>
  133. <td><?php echo $r; ?></td>
  134. </tr>
  135. <?php
  136. }
  137. ?>
  138. </table>
  139. <table width="100%">
  140. <tr>
  141. <td class="td1" width="70%">函数检测必须开启</td>
  142. <td class="td1" width="30%">当前状态</td>
  143. </tr>
  144. <tr>
  145. <td>file_put_contents</td>
  146. <td><?php echo $file_put_contents; ?></td>
  147. </tr>
  148. <tr>
  149. <td>imagettftext</td>
  150. <td><?php echo $imagettftext; ?></td>
  151. </tr>
  152. </table>
  153. </div>
  154. <div class="bottom tac">
  155. <a href="<?php echo $_SERVER['PHP_SELF']; ?>?step=2" class="btn">重新检测</a>
  156. <?php if($err>0){?>
  157. <a href="javascript:void(0)" onClick="javascript:alert('安装环境检测未通过,请检查')" class="btn" style="background: gray;">下一步</a>
  158. <?php }else{?>
  159. <a href="<?php echo $_SERVER['PHP_SELF']; ?>?step=3" class="btn">下一步</a>
  160. <?php }?>
  161. </div>
  162. </section>
  163. </div>
  164. <?php require './templates/footer.php';?>
  165. </body>
  166. </html>