Просмотр исходного кода

【程序目录】安装文件生成到public目录

sugar1569 3 лет назад
Родитель
Сommit
d0e41d1d62
2 измененных файлов с 4 добавлено и 5 удалено
  1. 1 1
      crmeb/public/index.php
  2. 3 4
      crmeb/public/install/index.php

+ 1 - 1
crmeb/public/index.php

@@ -15,7 +15,7 @@ namespace think;
 define('DS', DIRECTORY_SEPARATOR);
 
 //检测是否已安装CRMEB系统
-if(file_exists("./install/") && !file_exists("./install/install.lock")){
+if(file_exists("./install/") && !file_exists("./install.lock")){
     if($_SERVER['PHP_SELF'] != '/index.php'){
         header("Content-type: text/html; charset=utf-8");
         exit("请在域名根目录下安装,如:<br/> www.xxx.com/index.php 正确 <br/>  www.xxx.com/www/index.php 错误,域名后面不能圈套目录, 但项目没有根目录存放限制,可以放在任意目录,apache虚拟主机配置一下即可");

+ 3 - 4
crmeb/public/install/index.php

@@ -1,5 +1,4 @@
 <?php
-
 //最低php版本要求
 define('PHP_EDITION','7.1.0');
 //服务环境检测
@@ -9,7 +8,7 @@ if (function_exists('saeAutoLoader') || isset($_SERVER['HTTP_BAE_ENV_APPID']))
 define('APP_DIR', _dir_path(substr(dirname(__FILE__), 0, -15)));//项目目录
 define('SITE_DIR', _dir_path(substr(dirname(__FILE__), 0, -8)));//入口文件目录
 
-if (file_exists('./install.lock')) {
+if (file_exists('../install.lock')) {
     showHtml('你已经安装过该系统,如果想重新安装,请先删除install目录下的 install.lock 文件,然后再安装。');
 }
 @set_time_limit(1000);
@@ -138,7 +137,7 @@ switch ($step) {
 
 
         $folder = array(
-            'public/install',
+            'public',
             'public/uploads',
             'runtime',
         );
@@ -476,7 +475,7 @@ switch ($step) {
         $version = trim($curent_version['version']);
         installlog();
         include_once("./templates/step5.php");
-        @touch('./install.lock');
+        @touch('../install.lock');
         exit();
 }
 //读取版本号