Home > Backend Development > PHP Tutorial > PHP asynchronous execution method to simulate multi-threading

PHP asynchronous execution method to simulate multi-threading

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-25 08:54:44
Original
995 people have browsed it
  1. $fp = fsockopen('localhost',80,&$errno,&$errstr,5);
  2. if(!$fp)
  3. {
  4. echo "$errstr ($errno)
    n";
  5. }
  6. fputs($fp,"GET ./test.phprn"); //The path in this place must be correct. It was wrong at the beginning
  7. fclose($fp );
Copy the code

and place the required code in test.php so that it will be executed asynchronously.



Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template