fclose():参数#1($stream)必须是资源类型,给定bool
我刚刚重新启动我的 laravel 8.0 项目,但出现以下错误,请问可能是什么问题,每当我运行“PHP artisan serve”时都会发生这种情况
TypeError
fclose(): Argument #1 ($stream) must be of type resource, bool given
at C:UsersownerLaravel-Apptest-appvendorsymfonyprocessPipesWindowsPip
es.php:74
70? fclose($this->lockHandles[$pipe]);
71? }
72? $this->lockHandles[$pipe] = $h;
73?
? 74? if (!fclose(fopen($file, 'w')) || !$h = fopen($file
, 'r')) {
75? flock($this->lockHandles[$pipe], LOCK_UN);
76? fclose($this->lockHandles[$pipe]);
77? unset($this->lockHandles[$pipe]);
78? continue 2;
continue 2;
1 C:UsersownerLaravel-Apptest-appvendorsymfonyprocessPipesWindowsPi
pes.php:74
fclose()
2 C:UsersownerLaravel-Apptest-appvendorsymfonyprocessProcess.php:130
4
SymfonyComponentProcessPipesWindowsPipes::__construct()
回答
您可以打开任务管理器,然后查找 CLI(带有 php 徽标)后台进程,如果找到则杀死任务