添加注释

pull/18/head
icret 2019-06-29 08:55:24 +08:00
parent e066cd660d
commit d81d31d55e
12 changed files with 318 additions and 24 deletions

8
.idea/EasyImages2.0.iml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -0,0 +1,7 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<XML>
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
</XML>
</code_scheme>
</component>

View File

@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component>

View File

@ -0,0 +1,3 @@
<component name="ProjectDictionaryState">
<dictionary name="hqs" />
</component>

6
.idea/encodings.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="PROJECT" charset="UTF-8" />
</component>
</project>

25
.idea/misc.xml Normal file
View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="NodePackageJsonFileManager">
<packageJsonPaths />
</component>
<component name="ProjectInspectionProfilesVisibleTreeState">
<entry key="Project Default">
<profile-state>
<expanded-state>
<State>
<id />
</State>
</expanded-state>
<selected-state>
<State>
<id>Blade files</id>
</State>
</selected-state>
</profile-state>
</entry>
</component>
</project>

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/EasyImages2.0.iml" filepath="$PROJECT_DIR$/.idea/EasyImages2.0.iml" />
</modules>
</component>
</project>

13
.idea/php.xml Normal file
View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Behat">
<behat_settings>
<BehatSettings />
</behat_settings>
</component>
<component name="PhpUnit">
<phpunit_settings>
<PhpUnitSettings />
</phpunit_settings>
</component>
</project>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

210
.idea/workspace.xml Normal file
View File

@ -0,0 +1,210 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="58e7c2e4-b31b-4843-9837-5874d5083fb3" name="默认更改列表" comment="">
<change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/config.php" beforeDir="false" afterPath="$PROJECT_DIR$/config.php" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ComposerSettings">
<execution>
<executable />
</execution>
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="-1094">
<caret line="22" column="20" lean-forward="true" selection-start-line="22" selection-start-column="20" selection-end-line="22" selection-end-column="20" />
</first_editor>
<second_editor />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/config.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="780">
<caret line="89" column="5" lean-forward="true" selection-start-line="89" selection-start-column="5" selection-end-line="89" selection-end-column="6" />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/mm.php" />
<option value="$PROJECT_DIR$/README.md" />
<option value="$PROJECT_DIR$/config.php" />
</list>
</option>
</component>
<component name="PhpWorkspaceProjectConfiguration" interpreter_name="PHP" />
<component name="ProjectConfigurationFiles">
<option name="files">
<list>
<option value="$PROJECT_DIR$/.idea/EasyImages2.0.iml" />
<option value="$PROJECT_DIR$/.idea/misc.xml" />
<option value="$PROJECT_DIR$/.idea/php.xml" />
<option value="$PROJECT_DIR$/.idea/vcs.xml" />
<option value="$PROJECT_DIR$/.idea/encodings.xml" />
<option value="$PROJECT_DIR$/.idea/modules.xml" />
<option value="$PROJECT_DIR$/.idea/codeStyles/Project.xml" />
<option value="$PROJECT_DIR$/.idea/codeStyles/codeStyleConfig.xml" />
<option value="$PROJECT_DIR$/.idea/dictionaries/hqs.xml" />
</list>
</option>
</component>
<component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="309" />
<option name="y" value="32" />
<option name="width" value="1932" />
<option name="height" value="1087" />
</component>
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="EasyImages2.0" type="b2602c69:ProjectViewProjectNode" />
<item name="EasyImages2.0" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="ASKED_SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
<property name="settings.editor.selected.configurable" value="configurable.group.editor" />
<property name="settings.editor.splitter.proportion" value="0.2" />
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="RunManager">
<configuration name="mm.php" type="PhpLocalRunConfigurationType" factoryName="PHP Console" temporary="true" path="$PROJECT_DIR$/mm.php">
<method v="2" />
</configuration>
<recent_temporary>
<list>
<item itemvalue="PHP Script.mm.php" />
</list>
</recent_temporary>
</component>
<component name="SvnConfiguration">
<configuration>C:\Users\hqs\AppData\Roaming\Subversion</configuration>
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="58e7c2e4-b31b-4843-9837-5874d5083fb3" name="默认更改列表" comment="" />
<created>1561565921585</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1561565921585</updated>
<workItem from="1561565923812" duration="45000" />
<workItem from="1561623921873" duration="563000" />
<workItem from="1561768333985" duration="1287000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="1895000" />
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1936" height="1066" extended-state="6" />
<editor active="true" />
<layout>
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.25479743" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info id="Favorites" order="2" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" />
<window_info anchor="bottom" id="Run" order="2" weight="0.3290461" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
<window_info anchor="bottom" id="Database Changes" order="8" />
<window_info anchor="bottom" id="Version Control" order="9" />
<window_info anchor="bottom" id="Terminal" order="10" />
<window_info anchor="bottom" id="Event Log" order="11" side_tool="true" />
<window_info anchor="bottom" id="调试" order="12" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
<window_info anchor="right" id="Database" order="3" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/mm.php" />
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="-1094">
<caret line="22" column="20" lean-forward="true" selection-start-line="22" selection-start-column="20" selection-end-line="22" selection-end-column="20" />
</first_editor>
<second_editor />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/config.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="780">
<caret line="89" column="5" lean-forward="true" selection-start-line="89" selection-start-column="5" selection-end-line="89" selection-end-column="6" />
</state>
</provider>
</entry>
</component>
<component name="masterDetails">
<states>
<state key="ScopeChooserConfigurable.UI">
<settings>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
</component>
</project>

View File

@ -4,23 +4,24 @@
"简单图床示例")
## EasyImage 简单图床
> 支持多文件上传,异地上传,api上传,简单无数据库,返回图片url,markdown,bbscode,html的一款图床程序
> 支持多文件上传,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")
由于版本过老并且使用falsh上传在当前html5流行大势所趋下遂利用基础知识新写了一个以html5为默认上传并且支持flash,向下兼容至IE9。
<b>注意:</b>
1. 装之前先使用服务器打开check.php检查扩展是否都安装
1. 安装之前先使用浏览器访问check.php检查扩展是否都安装
2. 使用前请注意先修改config.php中的domain域名。
3. 安装正常后请修改登录管理密码!
4. 如果无法登陆管理界面或上传图片请先打开check.php检查扩展或者使用phpinfo检查。
5. 默认我会给你设置成最优方案api与异域上传默认关闭
6. 下载源码后可以删除一些文件README.md,check.php,LICENSE
7. 请将所有文件必须赋予0755权限执行用户设置www权限否则可能会导致上传成功但不返回url
8. 可以使用浏览器的 F12调试模式->console查看错误
9. js不要设置分片上传大小此会导致部分图片上传失败。
10. 欢迎加群623688684
3. 请将所有文件必须赋予0755权限执行用户设置www权限
4. 安装正常后请修改登录管理密码!
5. 如果无法登陆管理界面或上传图片请先打开check.php检查扩展或者使用phpinfo检查。
6. 可以使用浏览器的 F12调试模式->console查看错误
7. 如果对php不太熟悉的话不要将图床程序放置于二级目录
8. js不要设置分片上传大小此会导致部分图片上传失败。
9. 默认我会给你设置成最优方案api上传默认关闭
10. 下载源码后可以删除一些文件README.md,check.php,LICENSE
11. 欢迎加群:[623688684](https://shang.qq.com/wpa/qunwpa?idkey=3feb4e8be8f1839f71e53bf2e876de36afc6889b2630c33c877d8df5a5583a6f)
##### 一年未更新了这次带来了全新版本2.0
@ -36,18 +37,17 @@
#### 功能支持:
- [x] 支持仅登录后上传
- [x] 支持设置图片质量
- [x] 支持上传图片转换为指定格式
- [x] 支持设置图片指定宽/高
- [x] 支持限制最低宽度/高度上传
- [x] 支持静态文件CDN/本地切换
- [x] 在线管理图片
- [x] 支持仅登录后上传
- [x] 支持设置广告
- [x] 支持网站统计 请将统计代码放入:public/static/hm.js
- [x] 图片管理(删除,查看)
- [x] 支持上传图片至远程服务器(异域存储)
- [x] 支持开启/关闭api上传
- [x] 在线管理图片(增、删、改、查)
- [x] 支持网站统计 请将统计代码放入:public/static/hm.js
#### api上传示例
参数:
@ -71,9 +71,10 @@ api上传成功后返回json
如果关闭api上传则什么都不显示。
* 2019-6-26 v2.0.2.0
- 精简压缩代码,使得不再压缩后变大
- 精简压缩代码,使得不再压缩后反而变大
- 删除异域上传功能,不再支持异域上传
- 其他一些细节优化
- 允许自定义上传扩展名
- 其他一些优化
* 2019-6-14 v2.0.1.9

View File

@ -19,6 +19,8 @@ ini_set('memory_limit', '512M');
// 定义当前目录
define('APP_ROOT', __DIR__);
/******** 网站配置 ********/
$config = array(
// 网站标题
'title' => '简单图床 - EasyImage',
@ -28,11 +30,11 @@ $config = array(
'description' => '简单图床EasyImage是一款支持多文件上传的无数据库图床,可以完美替代PHP多图上传程序最新html5自适应页面兼容手机电脑上传后返回图片直链markdown图片论坛贴图bbscode链接简单方便支持一键复制支持多域名api上传。',
// 网站公告
'tips' => ' 单个文件限制5M每次最多上传30张图片,本网站仅做演示用,不对图片负任何责任。',
// 当前域名,末尾不加"/" 如果是异域上传请修改为当前异域域名
// 图片直链域名 末尾不加"/" 如果你想上传域名是a.com但是我想上传之后返回域名是b.com 那就在这里填写b.com
'domain' => 'https://img.545141.com',
// 存储路径 前后要加"/" 如更改此目录需要同步修改tinyfilemanager.php中的$directories_users路径
'path' => '/i/',
// 最大上传限制 默认为5m 请使用工具转换mb http://www.bejson.com/convert/filesize/
// 最大上传限制 默认为 5242880Bytes = 5MB 请使用工具转换MB http://www.bejson.com/convert/filesize/
'maxSize' => 5242880,
// 是否开启登录上传 开启:true 关闭false
'mustLogin' => false,
@ -53,11 +55,11 @@ $config = array(
* 5:图片中心 6:右边居中 7:底部居左 8:底部居中 9:底部居右
*/
'waterPosition' => 8,
// 水印文字颜色 rgba 末尾为透明度0-127 0为不透明
// 水印文字颜色 rgba 末尾为透明度 范围:0-127 0为不透明
'textColor' => '47,79,79,0',
// 水印文字大小
'textSize' => 16,
// 字体路径 如果想改变字体,请选择支持中文的 gb2312
// 字体路径 如果想改变字体 请选择支持中文的gb2312字体 否则中文水印会乱码 纯英文水印字体随便
'textFont' => APP_ROOT . '/public/static/hkxzy.ttf',
// 图片水印路径 支持GIF,JPG,BMP,PNG和PNG alpha
'waterImg' => 'public/static/watermark.png',
@ -79,11 +81,11 @@ $config = array(
'image_x' => 1024,
// 缩减的最大宽度
'image_y' => 1024,
// 开启静态文件CDN 开启true 关闭false
// 开启静态文件js css CDN 开启true 关闭false
'static_cdn' => false,
// 开启顶部广告 如果想添加或修改广告请到 public/static/ad_top.html
// 开启顶部广告 如果想添加或修改广告修改 public/static/ad_top.html
'ad_top' => false,
// 开启底部广告 如果想添加或修改广告请到 public/static/ad_bot.html
// 开启底部广告 如果想添加或修改广告修改 public/static/ad_bot.html
'ad_bot' => false,
'Version' => '2.0.2.0',
);