问题描述
有人可以用两个词来解释我吗,什么是守护进程以及它们在php中的用途?
Could someone explain me in two words, what is daemon and what use of them in php?
我知道这是一个正在运行的进程时间。
但是我不明白它在php应用程序中有什么用途?
I, know that this is a process, which is runing all the time.But i can't understand what use of it in php app?
有人可以举一个使用示例吗?
我可以使用守护程序来减少我的应用程序的内存使用吗?
Can someone please give examples of use?Can i use daemon to lessen memory usage of my app?
据我了解,守护程序可以保存数据并根据请求提供它,因此基本上我可以存储
As i understand, daemon can hold data and give it on request, so basically i can store most usable data there, to avoid getting it from mysql for each visitor?
还是我完全错了? :)
Or i'm totally wrong? :)
谢谢;)
推荐答案
cli应用程序或进程
cli application or process
您可以用它来做;用户或界面不可见的作业,例如数据库陈旧数据清理,计划您要在后台更新数据库或页面上的部分或某些内容的任务
You can use it to do; job that is not visible to user or from interface, e.g. database stale data cleanup, schedule task that you you wanted to update part or something on db or page in background
我认为drupal或cron具有cron脚本...也许检查一下会帮帮我。减少记忆?不,内存优化始终是在应用程序设计或脚本编码上进行的。
I think drupal or cron had cron script...perhaps checking it would help. Lessen memory? no, memory optimization is always on the application design or script coded.
不,守护进程是一个脚本但是,您可以创建守护程序脚本可以处理的JSON或XML数据文件。
No, a daemon is a script however you can create a JSON or XML data file that the daemon script can process.
这篇关于什么是守护程序?它们的实际用途?与PHP一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!