change info
|
@ -123,9 +123,8 @@ $HTTP["url"] =~ "^/(i|public)/" {
|
|||
1. 确定已安装`docker`和`docker-compose`
|
||||
2. 拉去镜像 `docker pull icret/nsfw_restful_api:latest` 或者直接 `docker run -p 3307:3307 -d icret/nsfw_restful_api`
|
||||
3. 后台API设置中填入网址 比如:`http://IP:3307/api/nsfw/classify?url=`
|
||||
4. 后台图片安全图片鉴黄以nsfwjs方式
|
||||
5. nsfwjs鉴黄方式不支持webp
|
||||
- 程序期望nsfwjs返回json 并且如下格式:
|
||||
4. 后台图片安全图片鉴黄以nsfwjs方式
|
||||
5. 如果你使用别的nsfwjs api必须返回json格式如下:
|
||||
```json
|
||||
[{
|
||||
"className": "Drawing",
|
||||
|
|
|
@ -814,41 +814,42 @@ if (isset($_GET['recycle_reimg'])) {
|
|||
<div class="alert alert-primary">
|
||||
<h5>系统信息</h5>
|
||||
<hr />
|
||||
<p class="text-ellipsis">操作系统: <?PHP echo php_uname('s') . ' <small class="text-muted">' . php_uname() . '</small>'; ?></p>
|
||||
<p class="text-ellipsis">Web 服务: <?PHP echo $_SERVER['SERVER_SOFTWARE']; ?></p>
|
||||
<p class="text-ellipsis">服务器IP: <?PHP echo GetHostByName($_SERVER['SERVER_NAME']) ?></p>
|
||||
<p class="text-ellipsis">系统时间: <?PHP echo date("Y-m-d G:i:s"); ?></p>
|
||||
<p class="text-ellipsis">服务系统: <?PHP echo php_uname('s') . ' <small class="text-muted">' . php_uname() . '</small>'; ?></p>
|
||||
<p class="text-ellipsis">Web服务: <?PHP echo $_SERVER['SERVER_SOFTWARE']; ?></p>
|
||||
<p class="text-ellipsis">服务器IP: <?PHP echo $_SERVER["SERVER_ADDR"] ?></p>
|
||||
<p class="text-ellipsis">系统时间: <?PHP echo date("Y-m-d H:i:s"); ?></p>
|
||||
<p class="text-ellipsis">已用磁盘: <?php echo getDistUsed(disk_total_space(__DIR__) - disk_free_space(__DIR__)) ?></p>
|
||||
<p class="text-ellipsis">剩余磁盘: <?php echo getDistUsed(disk_free_space(__DIR__)); ?></p>
|
||||
<h5>PHP信息</h5>
|
||||
<hr />
|
||||
<p class="text-ellipsis">PHP: <?php echo phpversion(); ?></p>
|
||||
<p class="text-ellipsis">GD : <?php echo (gd_info()["GD Version"]); ?></p>
|
||||
<p class="text-ellipsis">PHP最大上传: <?PHP echo get_cfg_var("upload_max_filesize"); ?></p>
|
||||
<p class="text-ellipsis">POST最大上传: <?php echo ini_get('post_max_size'); ?></p>
|
||||
<p class="text-ellipsis">PHP最长执行时间: <?PHP echo get_cfg_var("max_execution_time") . "秒 "; ?></p>
|
||||
<p class="text-ellipsis">PHP允许占用内存: <?PHP echo get_cfg_var("memory_limit"); ?></p>
|
||||
<p class="text-ellipsis">PHP UP: <?PHP echo get_cfg_var("upload_max_filesize"); ?></p>
|
||||
<p class="text-ellipsis">POST UP: <?php echo ini_get('post_max_size'); ?></p>
|
||||
<p class="text-ellipsis">PHP Max Time: <?PHP echo get_cfg_var("max_execution_time") . "秒"; ?></p>
|
||||
<p class="text-ellipsis">PHP Max Memery: <?PHP echo get_cfg_var("memory_limit"); ?></p>
|
||||
<p class="text-ellipsis">GD: <?php echo (gd_info()["GD Version"]); ?></p>
|
||||
<h5>我的信息</h5>
|
||||
<hr />
|
||||
<p class="text-ellipsis">浏览器: <?php echo $_SERVER['HTTP_USER_AGENT']; ?></p>
|
||||
<p class="text-ellipsis">登录IP: <?php echo $_SERVER["REMOTE_ADDR"]; ?></p>
|
||||
<p class="text-ellipsis">Your IP: <?php echo real_ip(); ?></p>
|
||||
<p class="text-ellipsis">Browser: <?php echo $_SERVER['HTTP_USER_AGENT']; ?></p>
|
||||
<h5>图床信息</h5>
|
||||
<hr />
|
||||
<p class="text-ellipsis">
|
||||
<p>
|
||||
<?php if (empty($config['TinyPng_key'])) : ?>
|
||||
<i class="icon icon-times" data-toggle="tooltip" title="图片压缩TinyPng未填写">TinyPng</i><br />
|
||||
<?php else : ?>
|
||||
<i class="icon icon-check" data-toggle="tooltip" title="图片压缩TinyPng已填写">TinyPng</i><br />
|
||||
<?php endif; ?>
|
||||
<?php if (empty($config['moderatecontent_key'])) : ?>
|
||||
<i class="icon icon-times" data-toggle="tooltip" title="图片审查moderatecontent未填写">moderatecontent</i><br />
|
||||
<i class="icon icon-times" data-toggle="tooltip" title="图片审查moderatecontent未填写">Moderatecontent</i><br />
|
||||
<?php else : ?>
|
||||
<i class="icon icon-check" data-toggle="tooltip" title="图片审查moderatecontent已填写">Moderatecontent</i><br />
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
<p>
|
||||
<span class="label label-badge label-info">当前版本:<?php echo $config['version']; ?></span>
|
||||
<a href="https://github.com/icret/EasyImages2.0/blob/master/LICENSE" target="_blank"><span class="label label-badge" data-toggle="tooltip" title="许可证">GPL-2.0</span></a>
|
||||
<a href="https://github.com/easysoft/zui" target="_blank"><span class="label label-badge label-info" data-toggle="tooltip" title="前端使用的框架">ZUI</span></a>
|
||||
<span class="label label-badge label-info" data-toggle="tooltip" title="当前版本"><?php echo $config['version']; ?></span>
|
||||
<a href="https://github.com/icret/EasyImages2.0/releases" target="_blank"><span class="label label-badge label-success" data-toggle="tooltip" title="更新后删除<p>/admin/logs/verson/</p>文件夹会自动同步版本">最新版本:<?php echo getVersion(); ?></span></a>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -2448,13 +2448,13 @@ class Upload {
|
|||
$this->log .= ' MAGIC path is set to ' . $path . '<br />';
|
||||
}
|
||||
}
|
||||
if ($path) {
|
||||
if ($path && file_exists($path)) {
|
||||
$f = @finfo_open(FILEINFO_MIME, $path);
|
||||
} else {
|
||||
$this->log .= ' MAGIC path will not be used<br />';
|
||||
$f = @finfo_open(FILEINFO_MIME);
|
||||
}
|
||||
if (is_resource($f)) {
|
||||
if ($f) {
|
||||
$mime = finfo_file($f, realpath($this->file_src_pathname));
|
||||
finfo_close($f);
|
||||
$this->file_src_mime = $mime;
|
||||
|
@ -2956,7 +2956,7 @@ class Upload {
|
|||
function imageunset($im) {
|
||||
if (is_resource($im)) {
|
||||
imagedestroy($im);
|
||||
} else if (is_object($im) && $im instanceOf GdImage) {
|
||||
} else if (is_object($im) && $im instanceOf \GdImage) {
|
||||
unset($im);
|
||||
}
|
||||
}
|
||||
|
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 116 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 434 KiB After Width: | Height: | Size: 434 KiB |