Php daemon ......... recently, a php daemon that needs to run data distribution on linux is as follows: PHPcode/* receive. php inserts data sent by UDP into the trap table */receive. php/* trap_handle.php (used as the ultimate daemon for the php daemon .........
Recently, a php daemon that needs to run data distribution on linux is as follows:
PHP code
/* Receive. php inserts data sent by UDP into the trap table */receive. php/* trap_handle.php (used as a daemon) query data from the trap table and perform the following operations: 1. insert the queried data into four tables. each piece of data generates a configuration file (return array() )3.each piece of data should be inserted into a loglog to the log.txt and log Table 4. delete the data in the trap table */trap_handle.php
Nohup/usr/local/bin/php/opt/trap_handle.php 2> & 1>/dev/null &
If you use trap_handle as the daemon to run for a long time, there are no advantages or disadvantages. please have your own opinions and have your own experiences with similar things.
------ Solution --------------------
Personal opinion: not necessary
If necessary, use c to write the rst program.