mirror of
https://github.com/easy-wi/developer.git
synced 2025-02-20 11:23:28 +08:00
Update system_check.php
This commit is contained in:
parent
15bbb96124
commit
2aa99a4e80
@ -65,14 +65,14 @@ foreach ($modules as $module) {
|
||||
}
|
||||
|
||||
$functions = array('fopen');
|
||||
$systemCheckOk = array();
|
||||
$systemCheckError = array();
|
||||
|
||||
foreach ($functions as $function) {
|
||||
if (function_exists($function)) {
|
||||
$okField = "system_ok_$function";
|
||||
$systemCheckOk[$function] = $function->$okField;
|
||||
$systemCheckOk[$function] = true;
|
||||
} else {
|
||||
$errorField = "error_system_$function";
|
||||
$systemCheckError[$function] = $sprache->$errorField;
|
||||
$systemCheckError[$function] = "The function $function does not exist.";
|
||||
}
|
||||
}
|
||||
|
||||
@ -106,19 +106,19 @@ $folderArray = array(
|
||||
);
|
||||
|
||||
foreach ($folderArray as $folder) {
|
||||
if (is_dir(EASYWIDIR . "/${folder}")) {
|
||||
$handle = @fopen(EASYWIDIR . "/${folder}test.txt", "w+");
|
||||
if (is_dir(EASYWIDIR . "/{$folder}")) {
|
||||
$handle = @fopen(EASYWIDIR . "/{$folder}test.txt", "w+");
|
||||
|
||||
if ($handle) {
|
||||
fclose($handle);
|
||||
unlink(EASYWIDIR . "/${folder}test.txt");
|
||||
$systemCheckOk['folders'][] = "Folder exists and can write to: ${folder}";
|
||||
unlink(EASYWIDIR . "/{$folder}test.txt");
|
||||
$systemCheckOk['folders'][] = "Folder exists and can write to: {$folder}";
|
||||
|
||||
} else {
|
||||
$systemCheckError['folders'][] = "Folder exists but cannot edit files: ${folder}";
|
||||
$systemCheckError['folders'][] = "Folder exists but cannot edit files: {$folder}";
|
||||
}
|
||||
} else {
|
||||
$systemCheckError['folders'][] = "Folder does not exist or cannot access: ${folder}";
|
||||
$systemCheckError['folders'][] = "Folder does not exist or cannot access: {$folder}";
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user