mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-02-11 09:05:33 +00:00
移动安装目录,支持根目录index.php访问,也可以像tp5一样只对外开放crmeb一个目录
This commit is contained in:
parent
a5d8a2763f
commit
0909449b56
@ -277,7 +277,7 @@ switch ($step) {
|
|||||||
mysqli_query($conn,"truncate table ".$val[0]);
|
mysqli_query($conn,"truncate table ".$val[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
delFile('../public/upload'); // 清空测试图片
|
delFile(CRMEBDIR.'/public/uploads'); // 清空测试图片
|
||||||
}
|
}
|
||||||
//读取配置文件,并替换真实配置数据1
|
//读取配置文件,并替换真实配置数据1
|
||||||
$strConfig = file_get_contents(SITEDIR . 'install/' . $configFile);
|
$strConfig = file_get_contents(SITEDIR . 'install/' . $configFile);
|
||||||
@ -289,8 +289,8 @@ switch ($step) {
|
|||||||
$strConfig = str_replace('#DB_PREFIX#', $dbPrefix, $strConfig);
|
$strConfig = str_replace('#DB_PREFIX#', $dbPrefix, $strConfig);
|
||||||
$strConfig = str_replace('#DB_CHARSET#', 'utf8', $strConfig);
|
$strConfig = str_replace('#DB_CHARSET#', 'utf8', $strConfig);
|
||||||
// $strConfig = str_replace('#DB_DEBUG#', false, $strConfig);
|
// $strConfig = str_replace('#DB_DEBUG#', false, $strConfig);
|
||||||
@chmod(SITEDIR . '/application/database.php',0777); //数据库配置文件的地址
|
@chmod(CRMEBDIR . '/application/database.php',0777); //数据库配置文件的地址
|
||||||
@file_put_contents(SITEDIR . '/application/database.php', $strConfig); //数据库配置文件的地址
|
@file_put_contents(CRMEBDIR . '/application/database.php', $strConfig); //数据库配置文件的地址
|
||||||
|
|
||||||
//读取配置文件,并替换换配置
|
//读取配置文件,并替换换配置
|
||||||
// $strConfig = file_get_contents(SITEDIR . '/application/config.php');
|
// $strConfig = file_get_contents(SITEDIR . '/application/config.php');
|
||||||
@ -325,7 +325,7 @@ switch ($step) {
|
|||||||
case '5':
|
case '5':
|
||||||
$ip = get_client_ip();
|
$ip = get_client_ip();
|
||||||
$host = $_SERVER['HTTP_HOST'];
|
$host = $_SERVER['HTTP_HOST'];
|
||||||
$curent_version = file_get_contents(SITEDIR .'/application/version.php');
|
$curent_version = file_get_contents(CRMEBDIR .'/application/version.php');
|
||||||
$time = time();
|
$time = time();
|
||||||
$mt_rand_str = $create_date.sp_random_string(6);
|
$mt_rand_str = $create_date.sp_random_string(6);
|
||||||
$str_constant = "<?php".PHP_EOL."define('INSTALL_DATE',".$time.");".PHP_EOL."define('SERIALNUMBER','".$mt_rand_str."');";
|
$str_constant = "<?php".PHP_EOL."define('INSTALL_DATE',".$time.");".PHP_EOL."define('SERIALNUMBER','".$mt_rand_str."');";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user