Skip to content

Commit

Permalink
修复文件管理路径错误的BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
helloxz committed Sep 2, 2020
1 parent cd83864 commit 434e438
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ Zdir是一款使用PHP开发的目录列表程序,无需数据库,体积小

### Docker方式部署

Docker for Zdir一键部署脚本:

```bash
bash <(curl -Lsk https://raw.githubusercontent.com/helloxz/zdir/master/zdir-install.sh)
docker run --name="zdir" \
-d -p 1080:80 --restart=always \
-v /data/wwwroot/default:/data/wwwroot/default \
helloz/zdir \
/usr/sbin/run.sh
```

更多说明可参考:[https://www.xiaoz.me/archives/14809](https://www.xiaoz.me/archives/14809)
Expand Down
2 changes: 1 addition & 1 deletion config.simple.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
);
//设置参数
$config = array(
//需要读取的目录,如:/data/wwwroot/soft.xiaoz.org
//thedir为需要读取的目录,如:/data/wwwroot/soft.xiaoz.org,仅将zdir放在子目录的情况下需要配置此项,其它请勿配置此选项
"thedir" => '',
"allowip" => array(
//"0.0.0.0", //注意设置为0.0.0.0则不限制IP,更多说明请参考帮助文档:https://doc.xiaoz.me/#/zdir/
Expand Down
2 changes: 1 addition & 1 deletion functions/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.52-2020601
1.53-2020902
9 changes: 5 additions & 4 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,14 @@
// }
//如果是文件管理器
else if($c == 'admin') {
//如果当前目录存在
if( file_exists('./functions/admin.php') ) {
header("Location: ./zdir/functions/admin.php");
//如果是放在顶级目录下
if( $config['thedir'] == '') {
header("Location: ./functions/admin.php");
exit;
}

else{
header("Location: ./functions/admin.php");
header("Location: ./zdir/functions/admin.php");
exit;
}
}
Expand Down

0 comments on commit 434e438

Please sign in to comment.