diff --git a/.vscode/launch.json b/.vscode/launch.json
deleted file mode 100644
index dc9987f..0000000
--- a/.vscode/launch.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- // 使用 IntelliSense 了解相关属性。
- // 悬停以查看现有属性的描述。
- // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
- "version": "0.2.0",
- "configurations": [
- {
- "name": "Listen for XDebug",
- "type": "php",
- "request": "launch",
- "port": 9999
- },
- {
- "name": "Launch currently open script",
- "type": "php",
- "request": "launch",
- "program": "${file}",
- "cwd": "${fileDirname}",
- "port": 9999
- }
- ]
-}
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..cfbc66d
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,165 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
\ No newline at end of file
diff --git a/README.md b/README.md
index 2e6f9f2..eba256a 100644
--- a/README.md
+++ b/README.md
@@ -1,48 +1,39 @@
+#### 首页演示:

-
+#### 管理界面演示:
+
## EasyImage 简单图床
-> 支持多文件上传,异地上传,api上传,简单无数据库,返回图片url,markdown,bbscode,html的一款图床程序
-演示地址: [https://img.545141.com](https://img.545141.com"https://img.545141.com")
-之前一直用的图床程序是:[PHP多图长传程序2.4.3](http://www.mycodes.net/48/4925.htm "PHP多图长传程序2.4.3")
+> 支持多文件上传,异地上传,api上传,简单无数据库,返回图片url,markdown,bbscode,html的一款自适应图床程序
+演示地址:[https://img.545141.com](https://img.545141.com "PHP多图片上传程序 2.4.3")
+之前一直用的图床程序是:[PHP多图片上传程序 2.4.3](http://www.mycodes.net/48/4925.htm "PHP多图片上传程序 2.4.3")
由于版本过老并且使用falsh上传,在当前html5流行大势所趋下,遂利用基础知识新写了一个以html5为默认上传并且支持flash,向下兼容至IE9。
+#### 功能支持:
+- [x] 支持仅登录后上传
+- [x] 支持设置图片质量
+- [x] 支持QQ截图,剪切板上传
+- [x] 支持在线管理(增删改查)
+- [x] 支持上传图片转换为指定格式
+- [x] 支持文字/图片水印 文字/图片水印透明度
+- [x] 支持压缩图片并自定义图片质量,相比之前提高5倍以上
+- [x] 支持设置上传页面广告
+- [x] 支持设置图片指定宽/高
+- [x] 支持最低上传宽度/高度
+- [x] 支持开启/关闭api上传(默认关闭)
+- [x] 支持上传图片至远程服务器(异域存储,默认关闭)
+- [x] 支持网站统计 请将统计代码放入:public/static/hm.js
+
注意:
-
1. 装之前先使用服务器打开check.php检查扩展是否都安装!
-2. js不要设置分片上传大小,此会导致部分图片上传失败。
-3. 使用前请注意先修改config.php中的domain域名。
-4. 安装正常后请修改登录上传密码和管理密码!具体如何修改可以打开config.php里边有注释。
-5. 如果无法登陆管理界面或上传图片,请先打开check.php检查扩展。
-6. 默认我会给你设置成最优方案,如果需要其他的功能,比如异地存储和api上传,请仔细查看config.php文件
-
-
-##### 一年未更新了,这次带来了全新版本2.0!
-- 在继承上个版本(1.6.4)的基础上进行了全新优化
-- 修复上传经常失败的问题
-- 删除一些不常用但会增加功耗的过程 (删除的在下边会有标记)
-- 全新的压缩 将文件继续缩小
-- 全新的目录系统,精简代码
-- 设置仅允许在config.php修改,注释更加明了,即使没有代码基础也可以操作
-- 增加新的文件管理系统
+2. 使用前请注意先修改config.php中的domain域名。
+3. 安装正常后请修改登录上传密码和管理密码!具体如何修改可以打开config.php里边有注释。
+4. 如果无法登陆管理界面或上传图片,请先打开check.php检查扩展或者使用phpinfo检查。
+5. 默认我会给你设置成最优方案,api与异域上传默认关闭,如需要异地存储和api上传,请仔细查看教程。
+6. 下载源码后可以精简一些文件:README.md,check.php,LICENSE如不需要异域存储,可以删除crossdomain文件夹。
-#### 功能支持:
-
-- 支持设置图片质量
-- 支持上传图片转换为指定格式
-- 支持设置图片指定宽/高
-- 支持限制最低宽度/高度上传
-- 支持静态文件CDN/本地切换
-- ~~支持开启/关闭浏览最近上传图片~~ -> 使用最新的管理系统
-- 支持仅登录后上传
-- 支持设置广告
-- 支持网站统计 请将统计代码放入:public/static/hm.js
-- 图片管理(删除,查看)
-- 支持上传图片至远程服务器(异域存储)
-- 支持开启/关闭api上传
-
#### api上传示例:
参数:
@@ -84,65 +75,82 @@ header('Access-Control-Allow-Origin:https://A.com/')
指定域名可以限制别人上传图片!(并不能保证完全能防止,毕竟可以伪造)
---
-* 2019-5-23 v2.0
+ 2019-5-31 v2.0.1.9
+- 增加复制链接按钮
+- 恢复开启/关闭api上传
+- 恢复支持水印文字颜色
+- 恢复支持远程上传图片
+- 增加QQ截图,剪切板上传
+- 增加文字/图片水印透明度
+- 纪念一下2019年,将版本号改为2.0.1.9
+- 修改图片压缩方式,速度更快,相比之前提高5倍以上
+- 修复在centos64 lnmp1.6 php7.1环境下的图片信息读取问题
+- 修复安装时候的权限
+- 更改管理路径
+- 更改上传路径,文件名更短
+- 添加暂停按钮
+
+
+ 2019-5-23 v2.0
- 在继承上个版本(1.6.4)的基础上进行了全新优化
- 修复上传经常失败的问题
- 删除一些不常用但会增加功耗的过程
- 全新的压缩 将文件继续缩小
- 全新的目录系统,精简代码
- 设置仅允许在config.php修改,注释更加明了,即使没有代码基础也可以操作
-- 增加新的文件管理系统,感谢 tinyfilemanager
-- ~~支持文字/图片水印 可自定义文字颜色~~
+- 增加新的文件管理系统,支持增删改查
+- ~~支持删除远程上传文件~~
+- 支持文字/图片水印 可自定义文字颜色~~
- ~~支持文字水印背景颜色~~
- ~~支持文字水印透明度~~
-- ~~支持删除远程上传文件~~ -> 不再支持删除远程文件
- ~~(支持开启/关闭api自定义文字水印)~~
- ~~支持删除自定义删除图片(仅管理员)~~
-* 2018-8-17 v1.6.4
+ 2018-8-17 v1.6.4
- 支持删除远程上传文件
- 更改字体
- 添加api/远程上传 标识
-* 2018-8-16 v1.6.3
+
+ 2018-8-16 v1.6.3
- 支持开启/关闭api上传(支持开启/关闭api自定义文字水印)
- 修复权限错误
- 修复二级目录引入错误
-* 2018-8-8 v1.5.3
+ 2018-8-8 v1.5.3
- 添加上传图片至远程主机
- 修复逻辑
-* 2018-8-6 v1.4.3
+ 2018-8-6 v1.4.3
- 添加网站统计
- 添加删除上传文件
- 调整config.php
-* 2018-8-5 v1.4.2
+ 2018-8-5 v1.4.2
- 添加仅登录后上传
- 修复一处逻辑错误
- 修复一个漏洞
-* 2018-8-4 v1.3.2
+ 2018-8-4 v1.3.2
- 添加广告设置
- 完善引入机制
-* 2018-8-3 v1.2.2
+ 2018-8-3 v1.2.2
- [重要]修复水印图片不能添加
- 添加随机浏览上传图片 可以设定浏览数量和关闭浏览
- 优化代码,删除无用文件
- 完善一键CDN静态文件
-* 2018-08-02 v1.1.2
+ 2018-08-02 v1.1.2
- [重要] 修复gif上传添加水印成静态的问题
- 修复文字水印背景色不显示问题
- 修复在linux下的权限错误
- 一些优化更改
-* 2018-08-01 v1.0.1
+ 2018-08-01 v1.0.1
- 更改相关文件目录
- 优化代码
-* 2018-07-30 v1.0.0
+ 2018-07-30 v1.0.0
- 最初模型
#### 兼容性
@@ -154,4 +162,4 @@ header('Access-Control-Allow-Origin:https://A.com/')
- 感谢: [verot](https://www.verot.net "verot" )提供非常好用的class.upload.php上传类
- 感谢: [ZUI](http://zui.sexy/ "ZUI" ) 提供css框架
- 感谢:[tinyfilemanager](https://github.com/prasathmani/tinyfilemanager "tinyfilemanager" ) 提供的文件管理
- - 本源码遵循 GNU Public License
\ No newline at end of file
+ - 本源码遵循 GNU Public License
diff --git a/check.php b/check.php
index 98bd8d9..24f5176 100644
--- a/check.php
+++ b/check.php
@@ -36,6 +36,12 @@