简体   繁体   English

PHP Heroku中的后台进程

[英]Background process in PHP Heroku

I have searched a lot and now I am in confuse. 我进行了很多搜索,但现在却感到困惑。 I want to do background process for moving photos facebook to my server. 我想进行后台处理,将照片Facebook移动到我的服务器。 moving photos works fine. 移动照片效果很好。 but now I want to do it using background process(if user close the browser process still works till it done). 但是现在我想使用后台进程(如果用户关闭浏览器进程直到完成仍可以使用)。 I have used below code. 我用下面的代码。

exec("move-background.php > /dev/null &");

It doesn't works. 它不起作用。 move-background.php contains the code of moving photos. move-background.php包含移动照片的代码。 plese explain me how to do background process in php and please give the extra setting for Heroku. 请给我解释一下如何在php中进行后台处理,请给Heroku额外的设置。 because heroku doesn't provides settings for PHP. 因为heroku不提供PHP的设置。 Explain me in detail if possible. 如果可能,请详细说明我。

I reefered Running continuous PHP applications on free Heroku but it is not understandable for me. 在免费的Heroku上重新运行了连续的PHP应用程序,但这对我来说是无法理解的。 I am new in cmd plese help me 我是cmd plese的新手,请帮助我

我对php的后台进程了解不多,但是我建议您使用名为“ ignore_user-abort”“ max_execution_time 的php_ini设置。但是您必须小心使用这些设置,否则脚本将无限运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM