Home >Backend Development >PHP Tutorial >PHP uses the popen method to implement asynchronous operations.

PHP uses the popen method to implement asynchronous operations.

PHP中文网
PHP中文网Original
2016-09-12 17:27:312417browse

php uses the popen method to implement asynchronous operation problems:

Using the popen method to perform a video transcoding operation.
In order for the transcoding to be executed asynchronously, how can we know that this sentence has been executed? That’s how you know the transcoding is finished.

Reply content:

Record before execution and change it after execution

Try pclose(popen("php b.php -a $argv1 -b $argv2 &",'r'));

The above is the content of PHP using the popen method to implement asynchronous operations. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!


Statement:
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