|
|
发表于 2020-6-27 20:05:06
|
显示全部楼层
我的主要语言是 golang 和 python
php以前学过 看了下源码
单纯去除 ?dir= 可以在 app/src/ViewFunctions/FileUrl.php
- public function __invoke(string $path = '/'): string
- {
- $path = $this->stripLeadingSlashes($path);
- if (is_file($path)) {
- return $this->escape($path);
- }
- if ($path === '') {
- return '';
- }
- return sprintf('?dir=%s', $this->escape($path));
- }
复制代码
上面的修改为:
- public function __invoke(string $path = '/'): string
- {
- $path = $this->stripLeadingSlashes($path);
- // if (is_file($path)) {
- // return $this->escape($path);
- // }
- if ($path === '') {
- return '';
- }
- return $this->escape($path);
- }
复制代码
由于本机没有趁手的php工具 不能debug
你会发现url是变了 但是程序出错
所以你还需要找到 源程序之前是怎么处理 ?dir=??? 的再进行修改 |
|