安装 前面最新版是3.30.1,官网下载链接: 安装环境:PHP 5.3 或更高,需要PHP扩展 GD 和 Mcrypt 。 安装过程接不多说了,参考官方详细文档 需要注意的的伪静态设置是,如果原来配置文档有涉及js,css的设置建议先删除。(例如宝塔需要删除原来配置文档里面location ~js jpg...那部分) nginx伪静态 location / { if (!-e $request_filename){ # Rewrite any calls to html|json|xml|atom|rss if a folder matching * exists rewrite (.+)\.(html|json|xml|atom|rss)$ $1/ last; # Rewrite any calls to /render to the X3 image resizer rewrite ^/render/. /app/parsers/slir/ last; # Rewrite routes to X3 application index.php if they are non-existent files/dirs rewrite ^(.*)$ /index.php?$1 last; } } # Prevent web access to X3 /config and /_cache directories location ~ /(config|_cache) { deny all; } ------------------------------------------------------------------------------- 伪授权 以这个版本为例,目标:把验证网址https://auth.photo.gallery/改成 /auth 在/auth放入自己的授权文件 1)前台 修改 /app/public/js/3.30.1/x3.min.js 搜索 aHR0cHM6Ly9hdXRoLg== 替换为 Lw== 搜索 cGhvdG8uZ2FsbGVyeQ== 替换为 YXV0aA== 代码为base64加密,解密后对应 aHR0cHM6Ly9hdXRoLg== →→→ https://auth cGhvdG8uZ2FsbGVyeQ== →→→ photo.gallery Lw== →→→ / YXV0aA== →→→ auth 2)后台 修改 /panel/filemanager_js/x3_panel.js 搜索 aHR0cHM6Ly9hdXRoLnBob3RvLmdhbGxlcnkv 替换为 L2F1dGgv 代码为base64加密,解密后对应 aHR0cHM6Ly9hdXRoLnBob3RvLmdhbGxlcnkv →→→ https://auth.photo.gallery/ L2F1dGgv →→→ /auth/ 3)修改使用本地x3.min.js,方法有二 一是修改引用文件: 修改/app/templates/cc/29/202264ab201d0d43a63882c31b1c06ae7e7992a5c371c52f885633d0acfa.php 大概第71行 $context["core_js"] = (("https://cdn.jsdelivr.net/npm/x3.photo.gallery@" . $this->getAttribute((isset($context["page"]) ? $context["page"] : null), "x3_version")) . "/js/x3.min.js"); 修改为: $context["core_js"] = ("/app/public/js/3.30.1/x3.min.js"); 二是后台设置取消cdn,全部使用本地静态: 在后台设置->高级-CDN,取消勾选。 4)新建 验证文件/auth/index.php 简单模式: 或者指定域名模式 这样应该可以了。 好像POST授权网址后,只要status返回的代码不是301,它就不会判断是不是正版,不再进行下一步的弹窗和跳转了 ------------------------------------------------------------------------------- 想要开心的 方法和旧版一样,不会的自己下载我站的files.js 上传、删除、改名提示License required index.php配置 license_key 留空不填 再把下面这行删了看看 if(!config::$config['license_key']) json_error('License required!');