增加环境检测开关
parent
34de8ce4fa
commit
2c4dc0c959
|
@ -55,11 +55,11 @@ $config = array(
|
||||||
'maxUploadFiles' => 30,
|
'maxUploadFiles' => 30,
|
||||||
// 是否开启登录上传 开启:true 关闭:false
|
// 是否开启登录上传 开启:true 关闭:false
|
||||||
'mustLogin' => false,
|
'mustLogin' => false,
|
||||||
// 是否开启tinyfilemanager文件管理
|
// 是否开启tinyfilemanager文件管理 开启:true 关闭:false
|
||||||
'tinyfilemanager' => true,
|
'tinyfilemanager' => true,
|
||||||
// 登录上传和后台管理密码,管理用户名为:admin
|
// 登录上传和后台管理密码,管理用户名为:admin
|
||||||
'password' => 'admin@123',
|
'password' => 'admin@123',
|
||||||
// 是否开启API上传
|
// 是否开启API上传 开启:true 关闭:false
|
||||||
'apiStatus' => true,
|
'apiStatus' => true,
|
||||||
// 是否开启水印:0关闭,1文字水印,2图片水印 不能使用动态gif添加水印
|
// 是否开启水印:0关闭,1文字水印,2图片水印 不能使用动态gif添加水印
|
||||||
'watermark' => 0,
|
'watermark' => 0,
|
||||||
|
@ -92,24 +92,24 @@ $config = array(
|
||||||
'minWidth' => 5,
|
'minWidth' => 5,
|
||||||
// 允许上传的最小高度
|
// 允许上传的最小高度
|
||||||
'minHeight' => 5,
|
'minHeight' => 5,
|
||||||
// 等比例缩小图片 宽度和高度请设置 image_x image_y 开启true,关闭false 关闭下image_x和image_y设置不生效
|
// 等比例缩小图片 宽度和高度请设置 image_x image_y 开启:true 关闭:false 关闭下image_x和image_y设置不生效
|
||||||
'imgRatio' => false,
|
'imgRatio' => false,
|
||||||
// 缩减的最大高度
|
// 缩减的最大高度
|
||||||
'image_x' => 10240,
|
'image_x' => 10240,
|
||||||
// 缩减的最大宽度
|
// 缩减的最大宽度
|
||||||
'image_y' => 10240,
|
'image_y' => 10240,
|
||||||
// 开启静态文件CDN 开启true 关闭false
|
// 开启静态文件CDN 开启:true 关闭:false
|
||||||
'static_cdn' => false,
|
'static_cdn' => false,
|
||||||
// 开启顶部广告 开启true 关闭false 如果想添加或修改广告请到 public/static/ad_top.html
|
// 开启顶部广告 开启:true 关闭:false 如果想添加或修改广告请到 public/static/ad_top.html
|
||||||
'ad_top' => false,
|
'ad_top' => false,
|
||||||
// 开启底部广告 开启true 关闭false 如果想添加或修改广告请到 public/static/ad_bot.html
|
// 开启底部广告 开启:true 关闭:false 如果想添加或修改广告请到 public/static/ad_bot.html
|
||||||
'ad_bot' => false,
|
'ad_bot' => false,
|
||||||
// 开启游客预览(广场) 开启true 关闭false
|
// 开启游客预览(广场)开启:true 关闭:false
|
||||||
'showSwitch' => true,
|
'showSwitch' => true,
|
||||||
// 默认预览数量,可在网址后填写参数实时更改预览数量 如:https://img.545141.com/libs/list.php?num=3
|
// 默认预览数量,可在网址后填写参数实时更改预览数量 如:https://img.545141.com/libs/list.php?num=3
|
||||||
'listNumber' => 20,
|
'listNumber' => 20,
|
||||||
// 上传框底部自定义信息,仅支持html格式
|
// 上传框底部自定义信息,仅支持html格式
|
||||||
'customize' =>'
|
'customize' => '
|
||||||
<!--打赏
|
<!--打赏
|
||||||
<div id="ad" class="col-md-12" align="center" style="padding:5px;">
|
<div id="ad" class="col-md-12" align="center" style="padding:5px;">
|
||||||
<img data-toggle="lightbox" src="//i1.100024.xyz/i/2019/06/15/1u713g.png" data-image="//i1.100024.xyz/i/2019/06/15/1u713g.png" data-caption="赞助开发者" class="img-thumbnail" alt="" width="220">
|
<img data-toggle="lightbox" src="//i1.100024.xyz/i/2019/06/15/1u713g.png" data-image="//i1.100024.xyz/i/2019/06/15/1u713g.png" data-caption="赞助开发者" class="img-thumbnail" alt="" width="220">
|
||||||
|
@ -129,6 +129,8 @@ $config = array(
|
||||||
</a>
|
</a>
|
||||||
-->
|
-->
|
||||||
',
|
',
|
||||||
|
// 开启环境检测 开启:true 关闭:false
|
||||||
|
'checkEnv' => true,
|
||||||
// 当前版本
|
// 当前版本
|
||||||
'version' => '2.1.0',
|
'version' => '2.1.0',
|
||||||
);
|
);
|
||||||
|
|
|
@ -135,5 +135,5 @@ mustLogin();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
checkEnv(); // 环境检测
|
checkEnv($config['checkEnv']); // 环境检测
|
||||||
require_once __DIR__ . '/libs/footer.php';
|
require_once __DIR__ . '/libs/footer.php';
|
||||||
|
|
|
@ -102,5 +102,4 @@
|
||||||
<a href="https://www.545141.com/902.html" target="_blank">Icret</a> Ver:<a href="https://github.com/icret/easyImages2.0" target="_blank"><?php echo $config['version']; ?> <i class="icon icon-github"></i></a>
|
<a href="https://www.545141.com/902.html" target="_blank">Icret</a> Ver:<a href="https://github.com/icret/easyImages2.0" target="_blank"><?php echo $config['version']; ?> <i class="icon icon-github"></i></a>
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
|
@ -115,8 +115,7 @@ function static_cdn()
|
||||||
<script src="//cdn.staticfile.org/qrcodejs/1.0.0/qrcode.min.js"></script>
|
<script src="//cdn.staticfile.org/qrcodejs/1.0.0/qrcode.min.js"></script>
|
||||||
<script src="//cdn.staticfile.org/clipboard.js/2.0.8/clipboard.min.js?v2.0.8"></script>
|
<script src="//cdn.staticfile.org/clipboard.js/2.0.8/clipboard.min.js?v2.0.8"></script>
|
||||||
<script src="//cdn.bootcdn.net/ajax/libs/nprogress/0.2.0/nprogress.min.js"></script>
|
<script src="//cdn.bootcdn.net/ajax/libs/nprogress/0.2.0/nprogress.min.js"></script>
|
||||||
<script src="//cdn.jsdelivr.net/gh/icret/EasyImages2.0@2.1.0/public/static/hm.js"></script>
|
<script src="//cdn.jsdelivr.net/gh/icret/EasyImages2.0@2.1.0/public/static/hm.js"></script>';
|
||||||
';
|
|
||||||
} else {
|
} else {
|
||||||
// 本地文件
|
// 本地文件
|
||||||
return '<link href="../public/static/zui/css/zui.min.css?v1.9.2" rel="stylesheet">
|
return '<link href="../public/static/zui/css/zui.min.css?v1.9.2" rel="stylesheet">
|
||||||
|
@ -128,8 +127,7 @@ function static_cdn()
|
||||||
<script src="../public/static/qrcode.min.js?v2.0"></script>
|
<script src="../public/static/qrcode.min.js?v2.0"></script>
|
||||||
<script src="../public/static/hm.js"></script>
|
<script src="../public/static/hm.js"></script>
|
||||||
<script src="../public/static/zui/lib/clipboard/clipboard.min.js?vv1.5.5"></script>
|
<script src="../public/static/zui/lib/clipboard/clipboard.min.js?vv1.5.5"></script>
|
||||||
<script src="../public/static/nprogress.min.js"></script>
|
<script src="../public/static/nprogress.min.js"></script>';
|
||||||
';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,7 +141,6 @@ function tinyfilemanager()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 获取允许上传的扩展名
|
// 获取允许上传的扩展名
|
||||||
function getExtensions()
|
function getExtensions()
|
||||||
{
|
{
|
||||||
|
@ -168,7 +165,6 @@ function getDirectorySize($path)
|
||||||
return $bytestotal;
|
return $bytestotal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取指定文件夹文件数量
|
* 获取指定文件夹文件数量
|
||||||
* @param $url 传入一个路径如:/apps/web
|
* @param $url 传入一个路径如:/apps/web
|
||||||
|
@ -188,7 +184,6 @@ function getFileNumber($url)
|
||||||
return $num;
|
return $num;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 图片展示页面
|
* 图片展示页面
|
||||||
* getDir()取文件夹列表,getFile()取对应文件夹下面的文件列表,二者的区别在于判断有没有“.”后缀的文件,其他都一样
|
* getDir()取文件夹列表,getFile()取对应文件夹下面的文件列表,二者的区别在于判断有没有“.”后缀的文件,其他都一样
|
||||||
|
@ -302,7 +297,7 @@ function getActive($url)
|
||||||
/**
|
/**
|
||||||
* 加密/解密图片路径
|
* 加密/解密图片路径
|
||||||
* @param string $data 要加密的内容
|
* @param string $data 要加密的内容
|
||||||
* @param $mode=1或0 1解密 0加密
|
* @param int $mode =1或0 1解密 0加密
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function ulrHash($data, $mode)
|
function ulrHash($data, $mode)
|
||||||
|
@ -379,10 +374,11 @@ function is_online()
|
||||||
*
|
*
|
||||||
* 检测是否更改默认域名
|
* 检测是否更改默认域名
|
||||||
*/
|
*/
|
||||||
function checkEnv()
|
function checkEnv($mode)
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
|
if ($mode) {
|
||||||
// 扩展检测
|
// 扩展检测
|
||||||
$expand = array('fileinfo', 'iconv', 'gd', 'mbstring', 'openssl',);
|
$expand = array('fileinfo', 'iconv', 'gd', 'mbstring', 'openssl',);
|
||||||
foreach ($expand as $val) {
|
foreach ($expand as $val) {
|
||||||
|
@ -414,4 +410,5 @@ function checkEnv()
|
||||||
</script>
|
</script>
|
||||||
';
|
';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue