what does the error message 'Operation now in

2020-07-06 05:05发布

When trying to open a file using this command:

$fd = fopen('majestic_files/majestic_record.txt','w');

I get the following error message:

<b>Warning</b>:  fopen(majestic_files/majestic_record.txt) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Operation now in progress in

What does it mean, and how do I fix it?

标签: php fopen
5条回答
ら.Afraid
2楼-- · 2020-07-06 05:27

I think you have to add the "/" at the beginning of the file string ... just an idea with no guarantee

查看更多
干净又极端
3楼-- · 2020-07-06 05:34

Not directly related to the question of the OP, but if you are getting this error using the Laravel framework, chances are that the autoloader can't find one of the classes. For example this tends to happen if you move a class to a different directory without dumping the autoloader.

To fix this, try composer dumpautoload.

查看更多
啃猪蹄的小仙女
4楼-- · 2020-07-06 05:39

This occurs when there is an outstanding blocking operation.

In this context, the error implies that another process has a lock on the file, most likely due to the file being open and written to by whichever process holds the lock.

查看更多
我命由我不由天
5楼-- · 2020-07-06 05:40

I got this error message when trying to connect to an invalid local IP address. Correcting the host I was connecting to resolved the issue

查看更多
手持菜刀,她持情操
6楼-- · 2020-07-06 05:45

I encountered this "failed to open stream: Operation now in progress" error after accidentally passing just a path, rather than a full path & filename, to parse_ini_file.

查看更多
登录 后发表回答