且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在服务器端完全运行PHP脚本

更新时间:2023-11-27 22:39:28

您不必把它留在cron任务运行 - 你可以运行PHP脚本的屏幕里面

You don't need to leave it run in a cron job - you can just run the php script inside a screen.

只需输入;

screen php /path/to/myphpscript.php

一个屏幕会继续即使您从腻子断开运行。如果您需要检查起来就可以了,你可以使用;

A screen will continue running even after you disconnect from PuTTY. If you need to check up on it, you can use;

screen -r

要重新重视自己这一进程,并查看任何输出。

To re-attach yourself to this process, and view any output.