Skip to content

return download(xxx) 文件太大会导致 Allowed memory size of xxxxx bytes exhausted #1160

Description

@mgzhenhong

vendor/topthink/framework/src/think/response/File.php line 76

return $this->isContent ? $data : file_get_contents($data);

如果文件太大会导致内存不足.
这里能否改为返回一个具体执行输出的 callable $outputCallback;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions