modified 优化页面显示

This commit is contained in:
zhaoxiang 2016-11-20 16:22:42 +08:00
parent 9eb3951762
commit 8b3a7a2cc2

View File

@ -18,31 +18,31 @@ function checkEnv(){
'title' => '操作系统', 'title' => '操作系统',
'limit' => '不限制', 'limit' => '不限制',
'current' => PHP_OS, 'current' => PHP_OS,
'icon' => 'fa fa-check', 'icon' => 'fa fa-check text-success',
], ],
'php' => [ 'php' => [
'title' => 'PHP版本', 'title' => 'PHP版本',
'limit' => '5.6+', 'limit' => '5.6+',
'current' => PHP_VERSION, 'current' => PHP_VERSION,
'icon' => 'fa fa-check', 'icon' => 'fa fa-check text-success',
], ],
'upload' => [ 'upload' => [
'title' => '附件上传', 'title' => '附件上传',
'limit' => '不限制', 'limit' => '不限制',
'current' => ini_get('file_uploads') ? ini_get('upload_max_filesize'):'未知', 'current' => ini_get('file_uploads') ? ini_get('upload_max_filesize'):'未知',
'icon' => 'fa fa-check', 'icon' => 'fa fa-check text-success',
], ],
'disk' => [ 'disk' => [
'title' => '磁盘空间', 'title' => '磁盘空间',
'limit' => '100M+', 'limit' => '100M+',
'current' => '未知', 'current' => '未知',
'icon' => 'fa fa-check', 'icon' => 'fa fa-check text-success',
], ],
]; ];
//PHP环境检测 //PHP环境检测
if($items['php']['current'] < 5.6){ if($items['php']['current'] < 5.6){
$items['php']['icon'] = 'fa fa-close'; $items['php']['icon'] = 'fa fa-close text-danger';
session('error', true); session('error', true);
} }
@ -51,7 +51,7 @@ function checkEnv(){
$disk_size = floor(disk_free_space('./') / (1024*1024)).'M'; $disk_size = floor(disk_free_space('./') / (1024*1024)).'M';
$items['disk']['current'] = $disk_size.'B'; $items['disk']['current'] = $disk_size.'B';
if($disk_size < 100){ if($disk_size < 100){
$items['disk']['icon'] = 'fa fa-close'; $items['disk']['icon'] = 'fa fa-close text-danger';
session('error', true); session('error', true);
} }
} }
@ -70,13 +70,13 @@ function checkDirFile(){
'type' => 'file', 'type' => 'file',
'path' => ROOT_PATH . 'application/database.php', 'path' => ROOT_PATH . 'application/database.php',
'title' => '可写', 'title' => '可写',
'icon' => 'fa fa-check', 'icon' => 'fa fa-check text-success',
], ],
'2' => [ '2' => [
'type' => 'dir', 'type' => 'dir',
'path' => RUNTIME_PATH, 'path' => RUNTIME_PATH,
'title' => '可写', 'title' => '可写',
'icon' => 'fa fa-check', 'icon' => 'fa fa-check text-success',
] ]
]; ];
@ -86,11 +86,11 @@ function checkDirFile(){
if(!is_writable($path)){ if(!is_writable($path)){
if(is_dir($path)) { if(is_dir($path)) {
$val['title'] = '不可写'; $val['title'] = '不可写';
$val['icon'] = 'fa fa-close'; $val['icon'] = 'fa fa-close text-danger';
session('error', true); session('error', true);
}else{ }else{
$val['title'] = '不存在'; $val['title'] = '不存在';
$val['icon'] = 'fa fa-close'; $val['icon'] = 'fa fa-close text-danger';
session('error', true); session('error', true);
} }
} }
@ -98,13 +98,13 @@ function checkDirFile(){
if(file_exists($path)){ if(file_exists($path)){
if(!is_writable($path)){ if(!is_writable($path)){
$val['title'] = '不可写'; $val['title'] = '不可写';
$val['icon'] = 'fa fa-close'; $val['icon'] = 'fa fa-close text-danger';
session('error', true); session('error', true);
} }
}else{ }else{
if(!is_writable(dirname($path))){ if(!is_writable(dirname($path))){
$val['title'] = '不存在'; $val['title'] = '不存在';
$val['icon'] = 'fa fa-close'; $val['icon'] = 'fa fa-close text-danger';
session('error', true); session('error', true);
} }
} }