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