开发者

PHP background process

开发者 https://www.devze.com 2023-01-12 16:52 出处:网络
I\'ve wrote a php irc bot, but i need it to work in the background. With this there\'d be no quits or so. What is the best 开发者_如何学编程way to do this?

I've wrote a php irc bot, but i need it to work in the background. With this there'd be no quits or so. What is the best 开发者_如何学编程way to do this?

Thanks and Regards.


Take a look at the following website. There is a pretty descend explanation on how to write PHP daemons.

http://kevin.vanzonneveld.net/techblog/article/create_daemons_in_php/


Run it in screen, then detach. You can then quit the terminal and re-attach to the screen session later.


I use something similar:

nohup php /path/to/script.php > /dev/null 2> /dev/null&
0

精彩评论

暂无评论...
验证码 换一张
取 消