fix tips
parent
5f2ffb5c7b
commit
8b05affa30
|
@ -1 +1 @@
|
|||
custom: ['https://png.cm/sponsor/images/wechat.jpg']
|
||||
custom: ['https://cdn.jsdelivr.net/gh/icret/EasyImages2.0@2.5.5/public/images/wechat.jpg']
|
|
@ -68,7 +68,7 @@
|
|||
|
||||
## 程序升级
|
||||
|
||||
- 备份`config`(没有增加上传用户和api可以只保留`config.php`文件)目录和`上传目录`
|
||||
- 备份`config`目录(没有增加上传用户和api可以只保留`config.php`文件)和`图片目录`
|
||||
- 将新程序下载至网站目录解压覆盖,然后将备份的文件替换既完成升级
|
||||
|
||||
## 安全配置
|
||||
|
@ -104,6 +104,9 @@ $HTTP["url"] =~ "^/(i|public)/" {
|
|||
|
||||
<details><summary><mark>点击查看2.0版更新日志</mark></summary>
|
||||
|
||||
* 2022-3-7 v2.5.6 dev
|
||||
- 修复加密删除后不能正确提示
|
||||
|
||||
* 2022-3-4 v2.5.5
|
||||
- 增加设置页面检测是否开启登录上传
|
||||
- 将footer固定在底部
|
||||
|
|
|
@ -28,9 +28,9 @@ file_put_contents(APP_ROOT . '/config/EasyIamge.lock', '安装环境检测锁定
|
|||
<h4>EasyImage2.0 基础检测:</h4>
|
||||
<p>当前PHP版本:<sapn style="color:green"><?php echo phpversion() ?></sapn>
|
||||
</p>
|
||||
<p>upload_max_filesize - PHP上传最大值:<sapn style="color:green"><?php echo ini_get('upload_max_filesize'); ?></sapn>
|
||||
<p>PHP最大上传: <sapn style="color:green"><?php echo ini_get('upload_max_filesize'); ?></sapn>
|
||||
</p>
|
||||
<p>post_max_size - POST上传最大值:<sapn style="color:green"><?php echo ini_get('post_max_size'); ?></sapn>
|
||||
<p>POST最大上传: <sapn style="color:green"><?php echo ini_get('post_max_size'); ?></sapn>
|
||||
</p>
|
||||
<?php
|
||||
// 扩展检测 取消检测imagick扩展
|
||||
|
@ -49,19 +49,19 @@ file_put_contents(APP_ROOT . '/config/EasyIamge.lock', '安装环境检测锁定
|
|||
if (IS_WIN) {
|
||||
echo '
|
||||
<p style="color:green">upload.php 文件可执行</p>
|
||||
<p style="color:green">/i 目录可读写</p>
|
||||
<p style="color:green">' . $config['path'] . ' 目录可读写</p>
|
||||
';
|
||||
}
|
||||
if (!IS_WIN) {
|
||||
if ($quanxian !== '755' and !is_writable(APP_ROOT . '/i/')) {
|
||||
if ($quanxian !== '755' and !is_writable(APP_ROOT . $config['path'])) {
|
||||
echo '
|
||||
<p style="color:red">upload.php 文件不可执行</font>>
|
||||
<p style="color:red">/i 目录可读写</font>>
|
||||
<p style="color:red">' . $config['path'] . ' 目录可读写</font>>
|
||||
';
|
||||
} else {
|
||||
echo '
|
||||
<p style="color:green">upload.php 文件可执行</p>
|
||||
<p style="color:green">/i 目录可读写</p>
|
||||
<p style="color:green">' . $config['path'] . ' 目录可读写</p>
|
||||
';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ if (isset($_GET['hash'])) {
|
|||
|
||||
if ($config['image_recycl']) {
|
||||
// 如果开启回收站则进入回收站
|
||||
checkImg($delHash, 3, 'recycle/');
|
||||
if (checkImg($delHash, 3, 'recycle/') == true) {
|
||||
echo '
|
||||
<script>
|
||||
new $.zui.Messager("删除成功", {
|
||||
|
@ -53,6 +53,16 @@ if (isset($_GET['hash'])) {
|
|||
}).show();
|
||||
</script>
|
||||
';
|
||||
} else {
|
||||
echo '
|
||||
<script>
|
||||
new $.zui.Messager("文件不存在!", {
|
||||
type: "danger", // 定义颜色主题
|
||||
icon: "exclamation-sign" // 定义消息图标
|
||||
}).show();
|
||||
</script>
|
||||
';
|
||||
}
|
||||
} else {
|
||||
// 否则直接删除
|
||||
getDel($delHash, 'url');
|
||||
|
|
|
@ -6,7 +6,7 @@ require_once APP_ROOT . '/config/config.guest.php';
|
|||
/**
|
||||
* 判断GIF图片是否为动态
|
||||
* @param $filename string 文件
|
||||
* @return int
|
||||
* @return int 是|否
|
||||
*/
|
||||
function isAnimatedGif($filename)
|
||||
{
|
||||
|
@ -155,18 +155,20 @@ function static_cdn()
|
|||
echo $config['domain'];
|
||||
}
|
||||
}
|
||||
/*
|
||||
// 获取允许上传的扩展名
|
||||
|
||||
/**
|
||||
* 获取允许上传的扩展名
|
||||
*/
|
||||
function getExtensions()
|
||||
{
|
||||
global $config;
|
||||
$arr = explode(',', $config['extensions']);
|
||||
$mime = '';
|
||||
for ($i = 0; $i < count($config['extensions']); $i++) {
|
||||
$mime .= $config['extensions'][$i] . ',';
|
||||
for ($i = 0; $i < count($arr); $i++) {
|
||||
$mime .= $arr . ',';
|
||||
}
|
||||
return rtrim($mime, ',');
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* 获取目录大小 如果目录文件较多将很费时
|
||||
|
@ -656,7 +658,10 @@ function nsfwjs_json($url, $data = '')
|
|||
|
||||
/**
|
||||
* 检查图片是否违规
|
||||
* @param $imageUrl string 图片url
|
||||
* @param $imageUrl 图片链接
|
||||
* @param int $type 模式: 1|moderatecontent 2|nsfwjs 3|移入回收站
|
||||
* @param string $dir 移入的目录
|
||||
* @return bool
|
||||
*/
|
||||
function checkImg($imageUrl, $type = 1, $dir = 'suspic/')
|
||||
{
|
||||
|
@ -736,7 +741,12 @@ function checkImg($imageUrl, $type = 1, $dir = 'suspic/')
|
|||
if (!is_dir($suspic_dir)) { // 创建suspic目录并移动
|
||||
mkdir($suspic_dir, 0777, true);
|
||||
}
|
||||
if (is_file($old_path)) {
|
||||
rename($old_path, $new_path);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1105,7 +1115,7 @@ function check_api($token)
|
|||
global $tokenList;
|
||||
|
||||
if (!$config['apiStatus']) {
|
||||
// API关闭 服务端关闭API上传
|
||||
// 关闭API
|
||||
$reJson = array(
|
||||
"result" => 'failed',
|
||||
'code' => 201,
|
||||
|
@ -1115,7 +1125,7 @@ function check_api($token)
|
|||
}
|
||||
|
||||
if (!in_array($tokenList[$token], $tokenList)) {
|
||||
// Token 是否存在
|
||||
// Token 存在
|
||||
$reJson = array(
|
||||
"result" => 'failed',
|
||||
'code' => 202,
|
||||
|
@ -1125,7 +1135,7 @@ function check_api($token)
|
|||
}
|
||||
|
||||
if ($tokenList[$token]['expired'] < time()) {
|
||||
// Token 是否过期
|
||||
// Token 过期
|
||||
$reJson = array(
|
||||
"result" => 'failed',
|
||||
'code' => 203,
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<title><?php echo $config['title']; ?></title>
|
||||
<meta name="keywords" content="<?php echo $config['keywords']; ?>" />
|
||||
<meta name="description" content="<?php echo $config['description']; ?>" />
|
||||
<link rel="shortcut icon" href="<?php echo $config['domain']; ?>/favicon.ico" type="image/x-icon" />
|
||||
<link rel="shortcut icon" href="<?php static_cdn(); ?>/favicon.ico" type="image/x-icon" />
|
||||
<link href="<?php static_cdn(); ?>/public/static/zui/css/zui.min.css" rel="stylesheet">
|
||||
<link href="<?php static_cdn(); ?>/public/static/zui/theme/zui-theme-<?php echo $config['theme']; ?>.css" rel="stylesheet">
|
||||
<script src="<?php static_cdn(); ?>/public/static/zui/lib/jquery/jquery-3.6.0.min.js"></script>
|
||||
|
|
|
@ -12,7 +12,7 @@ $config=Array
|
|||
'user'=>'admin',
|
||||
'password'=>'e6e061838856bf47e1de730719fb2609',
|
||||
'mustLogin'=>0,
|
||||
'apiStatus'=>1,
|
||||
'apiStatus'=>0,
|
||||
'path'=>'/i/',
|
||||
'imgName'=>'default',
|
||||
'maxSize'=>10485760,
|
||||
|
@ -41,7 +41,7 @@ $config=Array
|
|||
'imgRatio_preserve_headers'=>1,
|
||||
'static_cdn'=>1,
|
||||
'theme'=>'default',
|
||||
'static_cdn_url'=>'https://cdn.jsdelivr.net/gh/icret/EasyImages2.0',
|
||||
'static_cdn_url'=>'https://cdn.jsdelivr.net/gh/icret/EasyImages2.0@2.5.5',
|
||||
'TinyPng_key'=>'',
|
||||
'checkImg'=>0,
|
||||
'checkImg_value'=>50,
|
||||
|
@ -99,7 +99,7 @@ var _hmt = _hmt || [];
|
|||
'image_recycl'=>1,
|
||||
'delDir'=>'thumbnails/',
|
||||
'version'=>'2.5.5',
|
||||
'update'=>'2022-03-05 10:45:32',
|
||||
'update'=>'2022-03-07 12:32:21',
|
||||
'terms'=>'<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
|
|
BIN
favicon.ico
BIN
favicon.ico
Binary file not shown.
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 4.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 6.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.1 KiB |
Loading…
Reference in New Issue