JS requests to PHP through AJAX. Does PHP reply that echo represents the end of a request? Can there be multiple echo?

JS requests to PHP through AJAX. Does PHP response echo represent the end of a request? Can there be multiple echo?

can PHP respond to this AJAX request multiple times?

for example,

PHP:

for($i = 0 ; $i < 200000 ; $i PP){
    mission_1()
}

echo ("mission 1 done");

for($i = 0 ; $i < 200000 ; $i PP){
    mission_2()
}

echo ("mission 2 done");

this requirement arises because you want to use PHP to populate the MySQL database.
such as an empty database, use PHP scripts to write large amounts of data to the database for testing.

Test database response, test database query speed, and so on.

Mar.18,2021
For

testing the database, I suggest you test it in one way instead of through an ajax request. You can get a microtime as the start time, and then, where you need to check the execution time, get the start time before microtime, minus, which is the program execution time. In this way, you can print the execution time of multiple segments of the program


and execute the PHP script directly from the command line.
use the time function to determine the time interval


script ends, the request ends
when the script ends, exit , return .


I don't know when the php program will end. This may be a little annoying.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3a955-2b9a1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3a955-2b9a1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?