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.
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
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).
Retrieve the
Content-Length
header from the remote location first. You can use get_headers to do that. Like so:It puts everything on hold until it's over
So you could use something like this to determine when it has finished writing the file.