step2.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  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. <link rel="stylesheet" href="./css/step2.css"/>
  8. <!-- 引入样式 -->
  9. <link rel="stylesheet" href="./css/theme-chalk.css">
  10. <!-- import Vue before Element -->
  11. <script src="./js/vue2.6.11.js"></script>
  12. <!-- import JavaScript -->
  13. <script src="./js/element-ui.js?v=9.0"></script>
  14. </head>
  15. <body>
  16. <div class="wrap" id="step2">
  17. <!-- --><?php //require './templates/header.php'; ?>
  18. <div class="title">
  19. 安装检测
  20. </div>
  21. <div class="content">
  22. <div class="menu">
  23. <div class="head">
  24. <h1>安装检测</h1>
  25. <a class="again" href="<?php echo $_SERVER['PHP_SELF']; ?>?step=2">重新检测
  26. <img class="upload" src="./images/install/upload.png" alt="">
  27. </a>
  28. </div>
  29. <div class="p8">安装环境需满足系统运行要求</div>
  30. <div>
  31. <div class="tab" :class="{'on': index === 0}" @click="index = 0">
  32. <div class="left-img">
  33. <img class="env" src="./images/install/environment.png" alt="">
  34. <img v-if="`<?php echo $passOne; ?>` == 'no'" class="warring"
  35. src="./images/install/warring.png" alt="">
  36. <img v-else class="warring" src="./images/install/sure.png" alt="">
  37. </div>
  38. <div>
  39. <div>环境及配置</div>
  40. <div class="p8">基础的系统操作环境</div>
  41. </div>
  42. </div>
  43. <div class="tab" :class="{'on': index === 1}" @click="index = 1">
  44. <div class="left-img">
  45. <img class="jur" src="./images/install/jurisdiction.png" alt="">
  46. <img v-if="`<?php echo $passTwo; ?>` == 'no'" class="warring btn-warning"
  47. src="./images/install/warring.png" alt="">
  48. <img v-else class="warring btn-warning" src="./images/install/sure.png" alt="">
  49. </div>
  50. <div>
  51. <div>权限检测</div>
  52. <div class="p8">目录及文件权限检测</div>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. <section class="config-list">
  58. <!-- <div class="step">-->
  59. <!-- <ul>-->
  60. <!-- <li class="current"><em>1</em>检测环境</li>-->
  61. <!-- <li><em>2</em>创建数据</li>-->
  62. <!-- <li><em>3</em>完成安装</li>-->
  63. <!-- </ul>-->
  64. <!-- </div>-->
  65. <div class="server">
  66. <table width="100%" v-if="index === 0">
  67. <tr>
  68. <td class="td1">环境检测</td>
  69. <td class="td1" width="25%">推荐配置</td>
  70. <td class="td1" width="25%">最低要求</td>
  71. <td class="td1" width="25%">当前状态</td>
  72. </tr>
  73. <tr>
  74. <td>操作系统</td>
  75. <td>类UNIX</td>
  76. <td>不限制</td>
  77. <td><div class="ls-td"><img class="yes" src="./images/install/yes.png" alt="对"><?php echo $os; ?></div></td>
  78. </tr>
  79. <tr>
  80. <td>服务器环境</td>
  81. <td>apache/nginx</td>
  82. <td>apache2.0以上/nginx1.6以上</td>
  83. <td><div class="ls-td"><img class="yes" src="./images/install/yes.png" alt="对"><?php echo $server; ?></div></td>
  84. </tr>
  85. <tr>
  86. <td>PHP版本</td>
  87. <td>><?php echo PHP_EDITION; ?></td>
  88. <td><?php echo PHP_EDITION; ?>以上</td>
  89. <td><div class="ls-td"><img class="yes" src="./images/install/yes.png" alt="对"><?php echo $phpv; ?></div></td>
  90. </tr>
  91. <tr>
  92. <td>附件上传</td>
  93. <td>>2M</td>
  94. <td>不限制</td>
  95. <td><div class="ls-td"><?php echo $uploadSize; ?></div></td>
  96. </tr>
  97. <tr>
  98. <td>session</td>
  99. <td>启用</td>
  100. <td>启用</td>
  101. <td><div class="ls-td"><?php echo $session; ?></div></td>
  102. </tr>
  103. <tr>
  104. <td>safe_mode</td>
  105. <td>基础配置</td>
  106. <td>启用</td>
  107. <td><div class="ls-td"><?php echo $safe_mode; ?></div></td>
  108. </tr>
  109. <tr>
  110. <td>GD库</td>
  111. <td>必须开启</td>
  112. <td>1.0以上</td>
  113. <td><div class="ls-td"><?php echo $gd; ?></div></td>
  114. </tr>
  115. <tr>
  116. <td>mysqli</td>
  117. <td>必须开启</td>
  118. <td>启用</td>
  119. <td><div class="ls-td"><?php echo $mysql; ?></div></td>
  120. </tr>
  121. <tr>
  122. <td>curl_init</td>
  123. <td>必须扩展</td>
  124. <td>启用</td>
  125. <td><div class="ls-td"><?php echo $curl; ?></div></td>
  126. </tr>
  127. <tr>
  128. <td>bcmath</td>
  129. <td>必须扩展</td>
  130. <td>启用</td>
  131. <td><div class="ls-td"><?php echo $bcmath; ?></div></td>
  132. </tr>
  133. <tr>
  134. <td>openssl</td>
  135. <td>必须扩展</td>
  136. <td>启用</td>
  137. <td><div class="ls-td"><?php echo $openssl; ?></div></td>
  138. </tr>
  139. </table>
  140. <table width="100%" v-else>
  141. <tr>
  142. <td class="td1">权限检查</td>
  143. <td class="td1" width="25%">推荐配置</td>
  144. <td class="td1" width="25%">写入</td>
  145. <td class="td1" width="25%">读取</td>
  146. </tr>
  147. <?php
  148. foreach ($folder as $dir) {
  149. $Testdir = APP_DIR . $dir;
  150. if (!is_file($Testdir)) {
  151. if (!is_dir($Testdir)) {
  152. dir_create($Testdir);
  153. }
  154. }
  155. if (testwrite($Testdir)) {
  156. $w = '<img class="yes" src="./images/install/yes.png" alt="对">可写 ';
  157. } else {
  158. $w = '<img class="no" src="./images/install/warring.png" alt="错">不可写 ';
  159. }
  160. if (is_readable($Testdir)) {
  161. $r = '<img class="yes" src="./images/install/yes.png" alt="对">可读';
  162. } else {
  163. $r = '<img class="no" src="./images/install/warring.png" alt="错">不可读';
  164. }
  165. ?>
  166. <tr>
  167. <td><?php echo $dir; ?></td>
  168. <td>读写</td>
  169. <td>
  170. <div class="ls-td"><?php echo $w; ?></div>
  171. </td>
  172. <td>
  173. <div class="ls-td"><?php echo $r; ?></div>
  174. </td>
  175. </tr>
  176. <?php
  177. }
  178. ?>
  179. <?php
  180. foreach ($file as $filename) {
  181. $filedir = APP_DIR . $filename;
  182. if (is_writeable($filedir)) {
  183. $w = '<img class="yes" src="./images/install/yes.png" alt="对">可写 ';
  184. } else {
  185. $w = '<img class="no" src="./images/install/warring.png" alt="错">不可写 ';
  186. }
  187. if (is_readable($filedir)) {
  188. $r = '<img class="yes" src="./images/install/yes.png" alt="对">可读';
  189. } else {
  190. $r = '<img class="no" src="./images/install/warring.png" alt="错">不可读';
  191. }
  192. ?>
  193. <tr>
  194. <td><?php echo $filename; ?></td>
  195. <td>读写</td>
  196. <td>
  197. <div class="ls-td"><?php echo $w; ?></div>
  198. </td>
  199. <td>
  200. <div class="ls-td"><?php echo $r; ?></div>
  201. </td>
  202. </tr>
  203. <?php
  204. }
  205. ?>
  206. </table>
  207. <!-- <table width="100%">-->
  208. <!-- <tr>-->
  209. <!-- <td class="td1" width="25%">函数检测必须开启</td>-->
  210. <!-- <td class="td1" width="25%">当前状态</td>-->
  211. <!-- <td class="td1" width="25%">函数检测必须开启</td>-->
  212. <!-- <td class="td1" width="25%">当前状态</td>-->
  213. <!-- </tr>-->
  214. <!-- <tr>-->
  215. <!-- <td>file_put_contents</td>-->
  216. <!-- <td>--><?php //echo $file_put_contents; ?><!--</td>-->
  217. <!-- <td>imagettftext</td>-->
  218. <!-- <td>--><?php //echo $imagettftext; ?><!--</td>-->
  219. <!-- </tr>-->
  220. <!-- <tr>-->
  221. <!-- <td>proc_open</td>-->
  222. <!-- <td>--><?php //echo $proc_open; ?><!--</td>-->
  223. <!-- <td>pcntl_signal</td>-->
  224. <!-- <td>--><?php //echo $pcntl_signal; ?><!--</td>-->
  225. <!-- </tr>-->
  226. <!-- <tr>-->
  227. <!-- <td>pcntl_signal_dispatch</td>-->
  228. <!-- <td>--><?php //echo $pcntl_signal_dispatch; ?><!--</td>-->
  229. <!-- <td>pcntl_fork</td>-->
  230. <!-- <td>--><?php //echo $pcntl_fork; ?><!--</td>-->
  231. <!-- </tr>-->
  232. <!-- <tr>-->
  233. <!-- <td>pcntl_wait</td>-->
  234. <!-- <td>--><?php //echo $pcntl_wait; ?><!--</td>-->
  235. <!-- <td>pcntl_alarm</td>-->
  236. <!-- <td>--><?php //echo $pcntl_alarm; ?><!--</td>-->
  237. <!-- </tr>-->
  238. <!-- </table>-->
  239. </div>
  240. </section>
  241. </div>
  242. <div class="trip mid">
  243. <img src="./images/install/trip-icon.png" alt="">
  244. 温馨提示:程序运行需配置伪静态,否则安装后会存在无法使用的情况
  245. </div>
  246. <div class="bottom-btn">
  247. <div class="bottom tac up-btn">
  248. <a href="<?php echo $_SERVER['PHP_SELF']; ?>?step=1" class="btn">上一步</a>
  249. </div>
  250. <div class="bottom tac">
  251. <?php if ($passOne == 'no' || $passTwo == 'no') { ?>
  252. <span class="next" @click="next" class="btn">下一步</span>
  253. <?php } else { ?>
  254. <a href="<?php echo $_SERVER['PHP_SELF']; ?>?step=3" class="btn next">下一步</a>
  255. <?php } ?>
  256. </div>
  257. </div>
  258. </div>
  259. <?php require './templates/footer.php'; ?>
  260. </body>
  261. <script>
  262. new Vue({
  263. el: '#step2',
  264. data() {
  265. return {index: 0}
  266. },
  267. methods: {
  268. next() {
  269. this.$message({
  270. message: '安装环境检测未通过,请检查',
  271. type: 'warning'
  272. });
  273. }
  274. }
  275. })
  276. </script>
  277. </html>