mirror of
https://github.com/helloxz/onenav.git
synced 2026-06-04 21:02:43 +08:00
1.1.0
This commit is contained in:
parent
5aff02e9b9
commit
cb066da58e
@ -13,6 +13,8 @@ function check_env() {
|
||||
//检查PHP版本,需要大于7.0小于8.0
|
||||
$php_version = floatval(PHP_VERSION);
|
||||
$uri = $_SERVER["REQUEST_URI"];
|
||||
|
||||
// var_dump($uri);
|
||||
|
||||
if( ( $php_version < 7 ) || ( $php_version > 8 ) ) {
|
||||
exit("当前PHP版本{$php_version}不满足要求,需要7.0 <= PHP <= 7.4");
|
||||
@ -41,11 +43,15 @@ function check_env() {
|
||||
if( file_exists("data/config.php") ) {
|
||||
exit("配置文件已存在,无需再次初始化!");
|
||||
}
|
||||
//检查是否是二级目录
|
||||
$pattern = '/\/[a-z0-9\/]+$/';
|
||||
if( preg_match_all($pattern,$uri) ) {
|
||||
// 路径必须以/或者/index.php开头
|
||||
if( !preg_match('/^\/|\/index.php/',$uri) ) {
|
||||
exit("暂不支持二级目录安装!");
|
||||
}
|
||||
//检查是否是二级目录
|
||||
// $pattern = '/\/[a-z0-9\/]+$/';
|
||||
// if( preg_match_all($pattern,$uri) ) {
|
||||
// exit("暂不支持二级目录安装!");
|
||||
// }
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
2024.12.23
|
||||
1. 优化禁止二级目录安装检测
|
||||
|
||||
2024.12.19
|
||||
1. 修复default2主题编辑链接导致备用链接丢失问题
|
||||
2. 新增AI功能及相关API接口:ai_search
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -3,8 +3,8 @@
|
||||
"description": "OneNav目前功能最强大的默认主题,推荐使用。",
|
||||
"homepage": "https:\/\/blog.xiaoz.org",
|
||||
"help_url":"https://dwz.ovh/gnae4",
|
||||
"version": "1.2.0",
|
||||
"update": "2024\/12\/20",
|
||||
"version": "1.2.4",
|
||||
"update": "2024\/12\/23",
|
||||
"author": "xiaoz<xiaoz93@outlook.com>",
|
||||
"screenshot": "https://v.png.pub/imgs/2024/11/27/c01894e5d9e0d850.png",
|
||||
"demo":"https://nav.rss.ink",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user