Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lumen路径找不到问题的bug #290

Open
lyxxxh opened this issue May 17, 2023 · 0 comments
Open

lumen路径找不到问题的bug #290

lyxxxh opened this issue May 17, 2023 · 0 comments

Comments

@lyxxxh
Copy link

lyxxxh commented May 17, 2023

我的配置

PHP 8.0.26 (cli) (built: Apr 27 2023 00:18:17) ( NTS )
5.10.16.3-microsoft-standard-WSL2
Laravel Framework Lumen (8.3.4) (Laravel Components ^8.0)
"rap2hpoutre/laravel-log-viewer": "^2.3"

找不到日志路径

image

image

因为 \ 的原因,在 linux 绝对路径会失败,导致再次拼接路径。

解决:
所有 \\ 换成 /
image

进入子目录失败

image

解决:
先判断是否存在目录
image

$fullPath =  file_exists($folder) ? $folder :  $this->storage_path . '/' . $folder;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant