简体   繁体   中英

Execute a PHP CGI script as a background process?

我可以使用exec()将PHP CGI脚本作为后台进程运行吗?

You could try it to start it as an linux background process using exec().

You could try this:

exec('/usr/bin/php /path/to/your/script.php &') ;

The '&' tell's linux to start this command in the background.

Note: You lose control over your executed script at that point and it may not work with all hosts (especially shared host envoirements).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM