【问题标题】:ErrorException file_put_contents(): Exclusive locks are not supported for this stream IN MAC [duplicate]ErrorException file_put_contents():此流在 MAC 中不支持排他锁 [重复]
【发布时间】:2021-11-24 09:21:38
【问题描述】:

ErrorException file_put_contents(): 此流不支持独占锁!!

当我在 chrome http://127.0.0.1:8000 中打开新 Laravel 8 项目时显示此错误 它尝试了很多解决方案,但没有奏效!

【问题讨论】:

标签: php laravel


【解决方案1】:

在 FileSystem.php 中替换(显示在错误中)

public function put($path, $contents, $lock = false)
{
    return file_put_contents($path, $contents, $lock ? LOCK_EX : 0);
}

public function put($path, $contents, $lock = false) {
   return file_put_contents($path, $contents, 0);
}

laravel file_put_contents(): Exclusive locks are not supported for this stream

https://github.com/octobercms/october/issues/969

https://github.com/hasangilak/NoLock

【讨论】:

    猜你喜欢
    • 2019-01-28
    • 2018-06-03
    • 1970-01-01
    • 1970-01-01
    • 2012-10-19
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多