Dear Gods, After the user enters the 1.php page, executes two programs A and B, because A's execution time is relatively long, does not have the influence to the subsequent operation, but the B program is relatively simple, and after execution will jump to 2.php, I hoped realizes after the user enters the 1.php, executes the B program first, then jumps to the 2.php; 。 Can it be achieved? Thank you, great God!
Reply to discussion (solution)
1. PHP Multithreading
2. PHP Pseudo-Threading
3. Ajax Async
The first, the second type of Baidu to know, the first one of the more trouble, the principle is to separate different threads or process colleagues to access the two code snippets, by return value to jump
B
Header (' location:2.php ');
A
Thank you to the two gods, but why do the ideas differ so much? I can understand xuzuning ideas, single do not know Xuzuning, your program, to ensure that a program can execute, and does not affect my execution B program and jump to 2.php? Thanks again!!!
Thank you two teachers!!!