<h1 class="entry-title m-n font-thin h3 text-black l-h" style="box-sizing: border-box; margin: 0px; font-size: 24px; font-family: "Source Sans Pro", "Hiragino Sans GB", "Microsoft Yahei", SimSun, Helvetica, Arial, sans-serif, monospace; font-weight: 300; line-height: 1.42857;"><div class="entry-thumbnail" aria-hidden="true" style="box-sizing: border-box; color: rgb(119, 119, 119); font-size: 14px;"><img width="100%" height="auto" src="https://sunpma.com/usr/uploads/2021/05/753621866.jpg" class="img-responsive lazy" style="box-sizing: border-box; vertical-align: middle; max-width: 100%; display: block; height: auto;" /></div></h1><h2 style="box-sizing: border-box; font-family: inherit; line-height: 1.4; color: rgb(102, 102, 102); margin: 30px 0px 10px; font-size: 24px;">介绍</h2><h1 class="entry-title m-n font-thin h3 text-black l-h" style="box-sizing: border-box; margin: 0px; font-size: 24px; font-family: "Source Sans Pro", "Hiragino Sans GB", "Microsoft Yahei", SimSun, Helvetica, Arial, sans-serif, monospace; font-weight: 300; line-height: 1.42857;"><div id="post-content" class="wrapper-lg" style="box-sizing: border-box; padding: 30px; font-size: 14px; color: rgb(119, 119, 119);"><div class="entry-content l-h-2x" style="box-sizing: border-box; line-height: 2em;"><div name="介绍" data-unique="介绍" style="box-sizing: border-box;"></div><p style="box-sizing: border-box; margin-bottom: 20px; word-break: break-all;"><code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); background-color: rgb(249, 242, 244); border-radius: 4px;">Files Photo Gallery</code>是一个单文件PHP目录程序,可以放置到服务器上的任何目录,立即拥有一个文件和文件夹预览目录。它支持所有文件类型,并允许您预览图像、视频、音频和代码。</p><div name="链接" data-unique="链接" style="box-sizing: border-box;"></div></div></div></h1><h2 style="box-sizing: border-box; font-family: inherit; line-height: 1.4; color: rgb(102, 102, 102); margin: 30px 0px 10px; font-size: 24px;">链接</h2><h1 class="entry-title m-n font-thin h3 text-black l-h" style="box-sizing: border-box; margin: 0px; font-size: 24px; font-family: "Source Sans Pro", "Hiragino Sans GB", "Microsoft Yahei", SimSun, Helvetica, Arial, sans-serif, monospace; font-weight: 300; line-height: 1.42857;"><div class="wrapper-lg" style="box-sizing: border-box; padding: 30px; font-size: 14px; color: rgb(119, 119, 119);"><div class="entry-content l-h-2x" style="box-sizing: border-box; line-height: 2em;"><p style="box-sizing: border-box; margin-bottom: 20px; word-break: break-all;">官网:<a href="https://files.photo.gallery/" target="_blank" style="box-sizing: border-box; color: rgb(88, 102, 110); text-decoration-line: none; cursor: pointer; border-bottom: 1px solid rgb(153, 153, 153); overflow-wrap: break-word; word-break: break-all;">https://files.photo.gallery</a><br style="box-sizing: border-box;" />演示:<a href="https://files.photo.gallery/demo" target="_blank" style="box-sizing: border-box; color: rgb(88, 102, 110); text-decoration-line: none; cursor: pointer; border-bottom: 1px solid rgb(153, 153, 153); overflow-wrap: break-word; word-break: break-all;">https://files.photo.gallery/demo</a><br style="box-sizing: border-box;" />文档:<a href="https://forum.photo.gallery/viewtopic.php?f=66&t=9964" target="_blank" style="box-sizing: border-box; color: rgb(88, 102, 110); text-decoration-line: none; cursor: pointer; border-bottom: 1px solid rgb(153, 153, 153); overflow-wrap: break-word; word-break: break-all;">https://forum.photo& ... f=66&t=9964</a><br style="box-sizing: border-box;" />源码:<a href="https://cdn.jsdelivr.net/npm/files.photo.gallery/index.php" target="_blank" style="box-sizing: border-box; color: rgb(88, 102, 110); text-decoration-line: none; cursor: pointer; border-bottom: 1px solid rgb(153, 153, 153); overflow-wrap: break-word; word-break: break-all;">https://cdn.jsdelivr& ... y/index.php</a></p><div name="支持" data-unique="支持" style="box-sizing: border-box;"></div></div></div></h1><h2 style="box-sizing: border-box; font-family: inherit; line-height: 1.4; color: rgb(102, 102, 102); margin: 30px 0px 10px; font-size: 24px;">支持</h2><h1 class="entry-title m-n font-thin h3 text-black l-h" style="box-sizing: border-box; margin: 0px; font-size: 24px; font-family: "Source Sans Pro", "Hiragino Sans GB", "Microsoft Yahei", SimSun, Helvetica, Arial, sans-serif, monospace; font-weight: 300; line-height: 1.42857;"><div class="wrapper-lg" style="box-sizing: border-box; padding: 30px; font-size: 14px; color: rgb(119, 119, 119);"><div class="entry-content l-h-2x" style="box-sizing: border-box; line-height: 2em;"><ul style="box-sizing: border-box; margin: 1.5em 0px;"><li style="box-sizing: border-box;">单个文件只需将其放入服务器上的任何目录即可。</li><li style="box-sizing: border-box;">实时搜索和排序文件。</li><li style="box-sizing: border-box;">高级列表和库布局,可以实时切换。</li><li style="box-sizing: border-box;">预览 IPTC、EXIF 和 GPS 地图以查看您的照片。</li><li style="box-sizing: border-box;">使用缓存机制和 CDN 快速加载。</li><li style="box-sizing: border-box;">高级树菜单导航显示整个目录结构。</li><li style="box-sizing: border-box;">美丽的代码荧光笔来查看和编辑代码格式。</li><li style="box-sizing: border-box;">可选登录以保护访问。</li></ul><div name="安装" data-unique="安装" style="box-sizing: border-box;"></div></div></div></h1><h2 style="box-sizing: border-box; font-family: inherit; line-height: 1.4; color: rgb(102, 102, 102); margin: 30px 0px 10px; font-size: 24px;">安装</h2><h1 class="entry-title m-n font-thin h3 text-black l-h" style="box-sizing: border-box; margin: 0px; font-size: 24px; font-family: "Source Sans Pro", "Hiragino Sans GB", "Microsoft Yahei", SimSun, Helvetica, Arial, sans-serif, monospace; font-weight: 300; line-height: 1.42857;"><div class="wrapper-lg" style="box-sizing: border-box; padding: 30px; font-size: 14px; color: rgb(119, 119, 119);"><div class="entry-content l-h-2x" style="box-sizing: border-box; line-height: 2em;"><p style="box-sizing: border-box; margin-bottom: 20px; word-break: break-all;">将下载得到的<code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); background-color: rgb(249, 242, 244); border-radius: 4px;">index.php</code>文件放置到需要的网站目录,打开目录即可;<br style="box-sizing: border-box;" /> HP版本需要5.5以上,PHP扩展程序安装需求:<code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); background-color: rgb(249, 242, 244); border-radius: 4px;">GD</code> <code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); background-color: rgb(249, 242, 244); border-radius: 4px;">mbstring</code> <code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); background-color: rgb(249, 242, 244); border-radius: 4px;">fileinfo</code> <code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); background-color: rgb(249, 242, 244); border-radius: 4px;">exif</code><br style="box-sizing: border-box;" />宝塔面板安装PHP时已经默认安装了<code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); background-color: rgb(249, 242, 244); border-radius: 4px;">GD</code>和<code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); background-color: rgb(249, 242, 244); border-radius: 4px;">mbstring</code>扩展程序,所以无需额外安装<br style="box-sizing: border-box;" /><code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); background-color: rgb(249, 242, 244); border-radius: 4px;">fileinfo</code> - 用于生成图片预览<br style="box-sizing: border-box;" /><code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); background-color: rgb(249, 242, 244); border-radius: 4px;">exif</code> - 用于读取图片EXIF信息</p><div name="破解" data-unique="破解" style="box-sizing: border-box;"></div></div></div></h1><h2 style="box-sizing: border-box; font-family: inherit; line-height: 1.4; color: rgb(102, 102, 102); margin: 30px 0px 10px; font-size: 24px;">破解</h2><h1 class="entry-title m-n font-thin h3 text-black l-h" style="box-sizing: border-box; margin: 0px; font-size: 24px; font-family: "Source Sans Pro", "Hiragino Sans GB", "Microsoft Yahei", SimSun, Helvetica, Arial, sans-serif, monospace; font-weight: 300; line-height: 1.42857;"><div class="wrapper-lg" style="box-sizing: border-box; padding: 30px; font-size: 14px; color: rgb(119, 119, 119);"><div class="entry-content l-h-2x" style="box-sizing: border-box; line-height: 2em;"><p style="box-sizing: border-box; margin-bottom: 20px; word-break: break-all;"><code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); background-color: rgb(249, 242, 244); border-radius: 4px;">Files Photo Gallery</code>是完全开源的,免费版和授权版一致,没有任何区别<br style="box-sizing: border-box;" />只是免费版每次会弹出授权窗口,点击一下<code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); background-color: rgb(249, 242, 244); border-radius: 4px;">No thanks!</code>即可关闭<br style="box-sizing: border-box;" /><a data-fancybox="gallery" no-pjax="" data-type="image" data-caption="" href="https://sunpma.com/usr/uploads/2021/05/53617383.png" class="light-link" style="box-sizing: border-box; color: rgb(88, 102, 110); text-decoration-line: none; cursor: pointer; border-bottom: 1px solid rgb(153, 153, 153); overflow-wrap: break-word; word-break: break-all; border-top: none !important; border-right: none !important; border-left: none !important; border-image: initial !important;"><img src="https://sunpma.com/usr/uploads/2021/05/53617383.png" style="box-sizing: border-box; vertical-align: middle; max-width: 100%; padding: 2px; cursor: pointer; margin: 10px auto;" /></a><br style="box-sizing: border-box;" />破解授权有两个方法,一是JS本地化,二是JS网络化,当然JS网络化会更加方便快捷</p><div name="JS本地化:" data-unique="JS本地化:" style="box-sizing: border-box;"></div></div></div></h1><h3 style="box-sizing: border-box; font-family: inherit; line-height: 1.4; color: rgb(102, 102, 102); margin: 30px 0px 10px; font-size: 20px;">JS本地化:</h3><h1 class="entry-title m-n font-thin h3 text-black l-h" style="box-sizing: border-box; margin: 0px; font-size: 24px; font-family: "Source Sans Pro", "Hiragino Sans GB", "Microsoft Yahei", SimSun, Helvetica, Arial, sans-serif, monospace; font-weight: 300; line-height: 1.42857;"><div class="wrapper-lg" style="box-sizing: border-box; padding: 30px; font-size: 14px; color: rgb(119, 119, 119);"><div class="entry-content l-h-2x" style="box-sizing: border-box; line-height: 2em;"><p style="box-sizing: border-box; margin-bottom: 20px; word-break: break-all;">打开<code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); background-color: rgb(249, 242, 244); border-radius: 4px;">index.php</code>找到代码:<code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); background-color: rgb(249, 242, 244); border-radius: 4px;"><script src="<?php echo config: assets ?>js/files.js"></script></code><br style="box-sizing: border-box;" />将其替换为:<code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); background-color: rgb(249, 242, 244); border-radius: 4px;"><script src="js/files.js"></script></code><br style="box-sizing: border-box;" />再在同目录新建名为<code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); background-color: rgb(249, 242, 244); border-radius: 4px;">js</code>的文件夹,然后下载<code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); background-color: rgb(249, 242, 244); border-radius: 4px;">files.js</code>文件放置在其中即可;<br style="box-sizing: border-box;" /><code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); background-color: rgb(249, 242, 244); border-radius: 4px;">files.js</code>文件下载地址:<br style="box-sizing: border-box;" /></p><div class="hideContent" style="box-sizing: border-box; background: rgb(248, 248, 248); padding: 10px 40px; position: relative;"><a href="https://cdn.jsdelivr.net/gh/sunpma/cdn/other/files.js" target="_blank" style="box-sizing: border-box; background-color: transparent; color: rgb(88, 102, 110); text-decoration-line: none; cursor: pointer; border-bottom: 1px solid rgb(153, 153, 153); overflow-wrap: break-word; word-break: break-all;">https://cdn.jsdelivr& ... er/files.js</a></div><p style="box-sizing: border-box; margin-bottom: 20px; word-break: break-all;"></p><div name="JS网络化:" data-unique="JS网络化:" style="box-sizing: border-box;"></div></div></div></h1><h3 style="box-sizing: border-box; font-family: inherit; line-height: 1.4; color: rgb(102, 102, 102); margin: 30px 0px 10px; font-size: 20px;">JS网络化:</h3><h1 class="entry-title m-n font-thin h3 text-black l-h" style="box-sizing: border-box; margin: 0px; font-size: 24px; font-family: "Source Sans Pro", "Hiragino Sans GB", "Microsoft Yahei", SimSun, Helvetica, Arial, sans-serif, monospace; font-weight: 300; line-height: 1.42857;"><div class="wrapper-lg" style="box-sizing: border-box; padding: 30px; font-size: 14px; color: rgb(119, 119, 119);"><div class="entry-content l-h-2x" style="box-sizing: border-box; line-height: 2em;"><p style="box-sizing: border-box; margin-bottom: 20px; word-break: break-all;">打开<code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); background-color: rgb(249, 242, 244); border-radius: 4px;">index.php</code>找到代码:<code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); background-color: rgb(249, 242, 244); border-radius: 4px;"><script src="<?php echo config: assets ?>js/files.js"></script></code><br style="box-sizing: border-box;" />将其替换为如下代码即可;<br style="box-sizing: border-box;" />替换代码:<br style="box-sizing: border-box;" /></p><div class="hideContent" style="box-sizing: border-box; background: rgb(248, 248, 248); padding: 10px 40px; position: relative;"><code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); background-color: rgb(249, 242, 244); border-radius: 4px;"><script src="https://cdn.jsdelivr.net/gh/sunpma/cdn/other/files.js"></script></code></div><p style="box-sizing: border-box; margin-bottom: 20px; word-break: break-all;"></p><div name="常用配置参数" data-unique="常用配置参数" style="box-sizing: border-box;"></div></div></div></h1><h2 style="box-sizing: border-box; font-family: inherit; line-height: 1.4; color: rgb(102, 102, 102); margin: 30px 0px 10px; font-size: 24px;">常用配置参数</h2><h1 class="entry-title m-n font-thin h3 text-black l-h" style="box-sizing: border-box; margin: 0px; font-size: 24px; font-family: "Source Sans Pro", "Hiragino Sans GB", "Microsoft Yahei", SimSun, Helvetica, Arial, sans-serif, monospace; font-weight: 300; line-height: 1.42857;"><div class="wrapper-lg" style="box-sizing: border-box; padding: 30px; font-size: 14px; color: rgb(119, 119, 119);"><div class="entry-content l-h-2x" style="box-sizing: border-box; line-height: 2em;"><pre style="box-sizing: border-box; overflow: hidden; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px; padding: 0px; margin-top: 1.5em; margin-bottom: 1.5em; line-height: 1.42857; color: rgb(51, 51, 51); word-break: break-all; overflow-wrap: break-word; background-color: rgb(245, 245, 245); border-width: initial; border-style: none; border-color: rgb(222, 229, 231); border-radius: 0px; background-size: 30px, 30px; position: relative;"><code class="hljs php" style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: inherit; padding: 0px; color: black; background-color: transparent; border-radius: 0px; overflow-wrap: normal; display: block; overflow-x: auto; position: relative; margin: 10px 10px 1px 50px;"><span class="hljs-comment" style="box-sizing: border-box; color: rgb(0, 128, 0);">// 根目录配置</span>
<span class="hljs-string" style="box-sizing: border-box; color: rgb(163, 21, 21);">'root'</span> => <span class="hljs-string" style="box-sizing: border-box; color: rgb(163, 21, 21);">''</span>, <span class="hljs-comment" style="box-sizing: border-box; color: rgb(0, 128, 0);">// 相对路径或者绝对路径,不填代表当前目录,二级目录无需 / 符号</span>
<span class="hljs-string" style="box-sizing: border-box; color: rgb(163, 21, 21);">'start_path'</span> => <span class="hljs-keyword" style="box-sizing: border-box; color: rgb(0, 0, 255);">false</span>, <span class="hljs-comment" style="box-sizing: border-box; color: rgb(0, 128, 0);">// 分配加载到视图中的第一个目录,默认情况下,该目录与root目录相同</span>
<span class="hljs-comment" style="box-sizing: border-box; color: rgb(0, 128, 0);">// 授权登录</span>
<span class="hljs-string" style="box-sizing: border-box; color: rgb(163, 21, 21);">'username'</span> => <span class="hljs-string" style="box-sizing: border-box; color: rgb(163, 21, 21);">''</span>, <span class="hljs-comment" style="box-sizing: border-box; color: rgb(0, 128, 0);">// 用户账号(留空关闭)</span>
<span class="hljs-string" style="box-sizing: border-box; color: rgb(163, 21, 21);">'password'</span> => <span class="hljs-string" style="box-sizing: border-box; color: rgb(163, 21, 21);">''</span>, <span class="hljs-comment" style="box-sizing: border-box; color: rgb(0, 128, 0);">// 用户密码(留空关闭)</span>
<span class="hljs-comment" style="box-sizing: border-box; color: rgb(0, 128, 0);">// 排除文件或者目录</span>
<span class="hljs-string" style="box-sizing: border-box; color: rgb(163, 21, 21);">'files_exclude'</span> => <span class="hljs-string" style="box-sizing: border-box; color: rgb(163, 21, 21);">''</span>, <span class="hljs-comment" style="box-sizing: border-box; color: rgb(0, 128, 0);">// '/\.(png|jpe?g)$/i' / 解释:排除后缀png.jpeg.jpg</span>
<span class="hljs-string" style="box-sizing: border-box; color: rgb(163, 21, 21);">'dirs_exclude'</span> => <span class="hljs-string" style="box-sizing: border-box; color: rgb(163, 21, 21);">''</span>, <span class="hljs-comment" style="box-sizing: border-box; color: rgb(0, 128, 0);">// '/\/AAA|\/doc|\/222(\/|$)/i' / 解释:排除目录AAA.doc.222</span>
<span class="hljs-comment" style="box-sizing: border-box; color: rgb(0, 128, 0);">// 菜单</span>
<span class="hljs-string" style="box-sizing: border-box; color: rgb(163, 21, 21);">'menu_enabled'</span> => <span class="hljs-keyword" style="box-sizing: border-box; color: rgb(0, 0, 255);">true</span> <span class="hljs-comment" style="box-sizing: border-box; color: rgb(0, 128, 0);">// 启用或禁用左侧文件夹菜单</span>
<span class="hljs-string" style="box-sizing: border-box; color: rgb(163, 21, 21);">'menu_show'</span> => <span class="hljs-keyword" style="box-sizing: border-box; color: rgb(0, 0, 255);">true</span> <span class="hljs-comment" style="box-sizing: border-box; color: rgb(0, 128, 0);">// 文件夹菜单展开或折叠</span>
<span class="hljs-string" style="box-sizing: border-box; color: rgb(163, 21, 21);">'menu_sort'</span> => <span class="hljs-string" style="box-sizing: border-box; color: rgb(163, 21, 21);">'name_asc'</span> <span class="hljs-comment" style="box-sizing: border-box; color: rgb(0, 128, 0);">// 左侧文件夹菜单排序 / name_asc,name_desc,date_asc,date_desc</span>
<span class="hljs-comment" style="box-sizing: border-box; color: rgb(0, 128, 0);">// 布局</span>
<span class="hljs-string" style="box-sizing: border-box; color: rgb(163, 21, 21);">'layout'</span> => <span class="hljs-string" style="box-sizing: border-box; color: rgb(163, 21, 21);">'rows'</span> <span class="hljs-comment" style="box-sizing: border-box; color: rgb(0, 128, 0);">// 主视图区域布局,包括选项 列表,块,网格,行和列</span>
<span class="hljs-string" style="box-sizing: border-box; color: rgb(163, 21, 21);">'sort'</span> => <span class="hljs-string" style="box-sizing: border-box; color: rgb(163, 21, 21);">'name_asc'</span> <span class="hljs-comment" style="box-sizing: border-box; color: rgb(0, 128, 0);">// 主视图区域默认排序 / name_asc,name_desc,date_asc,date_desc</span></code><div><span class="hljs-comment" style="box-sizing: border-box; color: rgb(0, 128, 0);"><br /></span></div></pre></div></div></h1> |