Skip to content

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

Open
@lyxxxh

Description

@lyxxxh

我的配置

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions