Is it wise to use PHP for a daemon?

前端 未结 17 1423
庸人自扰
庸人自扰 2020-11-28 09:18

I wish to create a background process and I have been told these are usually written in C or something of that sort. I have recently found out PHP can be used to create a da

17条回答
  •  萌比男神i
    2020-11-28 10:10

    A cron job and a little bit of bash scripting should be everything you need by the sounds of it. You can do things like:

    $file=`mysqlquery -h server < "select file from table;"`
    ffmpeg $file -fps 50 output.a etc.
    

    so bash would be easier to write, port and maintain IMHO than to use PHP.

提交回复
热议问题