如何用php中的file_put_contents()检测结束? [英] How to detect the finish with file_put_contents() in php?
本文介绍了如何用php中的file_put_contents()检测结束?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在PHP中,我将使用file_put_contents($filename, $data);
写入(创建)文件
可以,但是我想检测进程的完成事件.
当前,页面显示加载状态.
目前,这是我可以知道它是否完成的方式.
我想用代码检测.
In PHP, i will write (create) the file using file_put_contents($filename, $data);
It is ok, but i want to detect the finish event of process.
Currently, the page is showing loading status.
This is currently the way i can know it is finish or not.
I want to detect with the code.
推荐答案
这是一个阻塞的I/O调用,因此在函数调用返回时结束.返回值是写入的字节数(成功后).
This is a blocking, I/O call, so it finishes when the function call returns. The return value is the number of bytes written (upon success).
这篇关于如何用php中的file_put_contents()检测结束?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文