mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-26 04:50:16 +00:00
移动安装目录,支持根目录index.php访问,也可以像tp5一样只对外开放crmeb一个目录
This commit is contained in:
parent
e8564ab46c
commit
4912532f0d
@ -336,17 +336,25 @@ switch ($step) {
|
||||
}
|
||||
|
||||
function testwrite($d) {
|
||||
$tfile = "_test.txt";
|
||||
$fp = @fopen($d . "/" . $tfile, "w");
|
||||
if (!$fp) {
|
||||
if(is_dir($d)){
|
||||
$tfile = "_test.txt";
|
||||
$fp = @fopen($d . "/" . $tfile, "w");
|
||||
if (!$fp) {
|
||||
return false;
|
||||
}
|
||||
fclose($fp);
|
||||
$rs = @unlink($d . "/" . $tfile);
|
||||
if ($rs) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}else{
|
||||
if(is_writeable($d)){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
fclose($fp);
|
||||
$rs = @unlink($d . "/" . $tfile);
|
||||
if ($rs) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
function sql_execute($sql, $tablepre) {
|
||||
|
||||
@ -84,13 +84,15 @@
|
||||
foreach($folder as $dir){
|
||||
$Testdir = CRMEBDIR.$dir;
|
||||
// echo $Testdir."<br/>";
|
||||
dir_create($Testdir);
|
||||
if(TestWrite($Testdir)){
|
||||
$w = '<span class="correct_span">√</span>可写 ';
|
||||
}else{
|
||||
$w = '<span class="correct_span error_span">√</span>不可写 ';
|
||||
$err++;
|
||||
}
|
||||
dir_create($Testdir);
|
||||
if(testwrite($Testdir)){
|
||||
$w = '<span class="correct_span">√</span>可写 ';
|
||||
}else{
|
||||
$w = '<span class="correct_span error_span">√</span>不可写 ';
|
||||
$err++;
|
||||
}
|
||||
|
||||
|
||||
if(is_readable($Testdir)){
|
||||
$r = '<span class="correct_span">√</span>可读' ;
|
||||
}else{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user