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

This commit is contained in:
sugar1569 2022-04-21 13:41:15 +08:00
parent c1e4297659
commit d0e41d1d62
2 changed files with 4 additions and 5 deletions

View File

@ -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虚拟主机配置一下即可");

View File

@ -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();
}
//读取版本号