-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Conversation
function.php检测账号失效状态;将index.php中获取BDUSS移动到function.php中; 将版权链接修改成GitHub仓库
你换电脑了?最近的提交咋都没 GPG 验证? |
那版本检查是为了防止用户意外操作导致的不完全更新而设置的,目的是使每个文件的版本统一,防止出现问题。 |
没用原来的那个电脑,这个没搞gpg 感觉这样判断没必要,有时候更新忘了改也会乱报错 |
一般都是覆盖安装或者直接pull更新,不会出现问题的 |
其实就是怕用户更新的时候少复制了什么文件,要不然也不用这么麻烦。 |
现在已经将config.php文件改成了实时生成,只要覆盖安装就不会出现问题 |
服务器上生产环境直接 Pull 可不太行,一般都是自己覆盖安装的,但是万一少复制了什么文件就麻烦了,或者说某个(或某几个)文件遇到了什么奇怪的冲突,也很麻烦。 API 和 Index 这类直接访问的无论如何都一定要版本检测,其他相关文件你自己取舍吧。 |
另外还要完善一下使用方法,README.md里写的太简单了 |
还有 |
行,一般都是直接访问index.php的 |
我想着要不要搞一个在线更新? |
我也在想,这样就可以避免很多问题 |
这里的直接访问包括用 JavaScript 通过 Ajax 访问 API,所以 api.php 也应该要。 |
要不QQ上说吧,邮件太多了吧…… |
实际上访问index.php的时候就已经拦截并转跳到安装页面了,api.php 这个倒不一定。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建议都在相关的行里面了。
@@ -10,7 +10,6 @@ | |||
* @link https://space.bilibili.com/88197958 | |||
* | |||
*/ | |||
$programVersion_API = '2.1.4'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API 还是要有版本检测比较好。
} | ||
break; | ||
case 0: | ||
//模式0:使用本地解析 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这太不专业了吧,随便传个东西进去,只要没被 case 到就是本地解析,容易出问题。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个函数只有输出啊,,
* @author Shelley Shyan | ||
* @copyright http://phparch.cn (Professional PHP Architecture) | ||
*/ | ||
function time2Units(int $time) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
一个月按30天算,一年按365天算是否会出问题?
Microsoft .NET 的 TimeSpan 都不支持 Day 和 Year.
因为它表示不引用特定开始点或结束点的常规间隔,所以不能用年份和月份来表示,这两种间隔的天数都是可变的。
https://docs.microsoft.com/zh-cn/dotnet/api/system.timespan
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
啊这 能解决吗
我觉得这样没多大问题
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
啊这 能解决吗
我觉得这样没多大问题
理论上来说可以解决,但是很麻烦,毕竟日历过于复杂,微软的计算器中不知用什么办法解决的,但肯定不是一般的方法,可能写了很多 if(猜的)。
@@ -10,7 +10,6 @@ | |||
* @link https://space.bilibili.com/88197958 | |||
* | |||
*/ | |||
$programVersion_Settings = '2.1.4'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
settings
这种用户直接访问的最好还是要验证。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
测试安装没问题
准备更新