对php文件进行AJAX调用 - >然后退出浏览器 - > php文件是否仍然可以完全运行?

If a user clicks a button that will make an ajax post call to a php file, then navigates away from the website or closes the window, will the php file run completely until it finishes?

i want the file to download stuff to my server and post a bunch of information into a mysql database. This could take a minute or two. But i want the task to finish completely no matter what the user does.

if the ajax post/request gets sent, will the file run through completely?

thanks for any info.

This should help:

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

Check out the documentation for those two functions for more insight. In general, you shouldn't have a problem, as long as you don't run up against the time limit. This should have all the info you need:

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