dongwo2772
dongwo2772
2010-03-22 13:09

执行PHP CGI脚本作为后台进程?

已采纳

Can I run a PHP CGI script as a background process using exec() ?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

  • dspows0637 dspows0637 11年前

    You could try it to start it as an linux background process using exec().

    You could try this:

    exec('/usr/bin/php /path/to/your/script.php &');

    The '&' tell's linux to start this command in the background.

    Note: You lose control over your executed script at that point and it may not work with all hosts (especially shared host envoirements).

    点赞 评论 复制链接分享

相关推荐