diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..8856069 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +custom: ['https://img.545141.com/sponsor/index.html'] \ No newline at end of file diff --git a/api/api-web.php b/api/api-web.php index 3b98ef5..5927bae 100644 --- a/api/api-web.php +++ b/api/api-web.php @@ -44,11 +44,13 @@ if (isset($_POST['delDir'])) {

EasyImage2.0 快捷操作中心


-
此页面为常用快捷操作,目录保存以 年/月/日/ 递进,非必要请勿修改!否则会导致部分操作不可用。
-
当前软件环境信息:PHP版本:;PHP上传最大值:;POST上传最大值:
+
目录保存以 年/月/日/ 递进,非必要请勿修改!否则会导致部分操作不可用。
+
环境信息:PHP版本:;PHP上传最大值:;POST上传最大值:
+ echo '今日上传:' . getFileNumber(APP_ROOT . config_path()) . ' 昨日上传:' . getFileNumber(APP_ROOT . $config['path'] . $yesterday) . '; 已用空间:' . getDistUsed(disk_total_space(__DIR__) - disk_free_space(__DIR__)) . ' 剩余空间:' . getDistUsed(disk_free_space(__DIR__)); ?> +
+
当前软件版本:,Github版本:
diff --git a/check.php b/check.php index 37274c7..25e15f3 100644 --- a/check.php +++ b/check.php @@ -30,7 +30,7 @@

说明:

1. 建议使用PHP7.0及以上版本;
-
2. 大部分上传失败是由于upload_max_filesize、post_max_size设置不正确;
+
2. 大部分上传失败是由于upload_max_filesize、post_max_size、文件权限设置不正确;
3. 本程序用到 Fileinfo、iconv、zip、mbstring、openssl 扩展,如果缺失会导致无法访问管理面板以及上传/删除图片。
4. zip扩展不是必须的,但会影响tinyfilemanager文件压缩(不会在首页中检测)。
5. 上传后必须修改config.php的位置:domain当前网站域名,imgurl当前图片域名,password登录管理密码!
@@ -39,10 +39,12 @@

EasyImage2.0 基础检测:

' . phpversion() . ''; - if (is_executable('file.php')) { - echo '
当前文件可执行'; + $quanxian = substr(base_convert(fileperms("file.php"), 10, 8), 3); + if (!is_executable('file.php') || $quanxian != '777') { + echo '
上传文件权限错误(当前权限:' . $quanxian . '),windows可以无视,linux使用 chmod -R 0777 /mulu/* 赋予权限'; } else { - echo '
当前文件不可执行,windows可以无视,linux使用 chmod -R 755 /路径/* 赋予权限'; + + echo '
当前文件可执行'; } echo '
upload_max_filesize PHP上传最大值:' . ini_get('upload_max_filesize'); echo '
post_max_size PHP POST上传最大值:' . ini_get('post_max_size') . '
'; diff --git a/config/config.php b/config/config.php index ae94d24..e8814f4 100644 --- a/config/config.php +++ b/config/config.php @@ -139,7 +139,7 @@ $config = array( // PHP插件检测-安全设置检测-版本检测 开启:true 关闭:false 'checkEnv' => true, // 当前版本 - 'version' => '2.2.1', + 'version' => '2.2.2', ); diff --git a/libs/footer.php b/libs/footer.php index 378812e..01d2fad 100644 --- a/libs/footer.php +++ b/libs/footer.php @@ -94,7 +94,7 @@
EasyImage By - Icret Ver: + Icret Version: diff --git a/libs/function.php b/libs/function.php index ec12730..ae84e80 100644 --- a/libs/function.php +++ b/libs/function.php @@ -173,13 +173,13 @@ function getDirectorySize($path) /** * 获取指定文件夹文件数量 - * @param $url 传入一个路径如:/apps/web + * @param $dir 传入一个路径如:/apps/web * @return int 返回文件数量 */ -function getFileNumber($url) +function getFileNumber($dir) { $num = 0; - $arr = glob($url); + $arr = glob($dir); foreach ($arr as $v) { if (is_file($v)) { $num++; @@ -242,13 +242,12 @@ function getFile($dir) * echo "目录数为:{$dirn}
"; * echo "文件数为:{$filen}
"; */ -$dirn = 0; //目录数 -$filen = 0; //文件数 + function getdirnum($file) { - global $dirn; - global $filen; + $dirn = 0; //目录数 + $filen = 0; //文件数 $dir = opendir($file); while ($filename = readdir($dir)) { if ($filename != "." && $filename != "..") { @@ -409,7 +408,7 @@ function checkEnv($mode) } // 检测是否更改默认域名 - $url = preg_replace('#^(http(s?))?(://)#', '', 'http://192.168.1.15'); + $url = preg_replace('#^(http(s?))?(://)#', '', 'http://192.168.2.100'); if (strstr($url, $_SERVER['HTTP_HOST'])) { echo ' - +