Make an AJAX call in the php file & # 8594; then close the browser & # 8594; will the php file work completely?

If the user clicks the button that will make the ajax post-call to the php file, then moves to the side of the website or closes the window, will the php file work completely until it ends?

I want the file to upload material to my server and send a bunch of information to the mysql database. This may take a minute or two. But I want the task to be completed completely no matter what the user does.

if an ajax message / request is sent, will the file be completely completed?

Thanks for any info.

+3
source share
2 answers

:

ignore_user_abort(true);
set_time_limit(0);       // number of seconds (0 infinity)

. , , . :

http://us3.php.net/manual/en/features.connection-handling.php

+6

Source: https://habr.com/ru/post/1762371/


All Articles