English 中文(简体)
B. 在背景中运行购买力平价功能
原标题:Running a PHP function in the background
  • 时间:2010-08-25 16:48:48
  •  标签:
  • php
  • email

我有两条小的改写文字,

首先,它执行电子邮件(使用邮件),然后才将此人转至新链接。

问题在于,由于某种原因,我的服务器上的邮电网确实进展缓慢,我不想影响我的来访者,

我怎么能够继续履行邮件职能,但这样做不会影响来访者立即转向新链接?

感谢

问题回答

http://us2.php.net/manual/en/Function.pcntl-fork.php“rel=“nofollow noreferer”>。

或者,你可以把电子邮件写到一个数据库,并在事实之后拥有一个工作程序电子邮件。

视服务器配置而定,你可能会发现,你可以把用户重新定位,flush(),然后发送邮件,而且邮件仍然成功。

如何把邮件放在数据库中,并打上邮寄的呼声?

这样,你也可以控制邮件地址。

这种背景处理的一种可能性是使用某种电传系统(AMQP,零MQ,......)。

http://www.php.net/manual/en/features.jointion-handling.php#71172“rel=“nofollow noretinger”>discussion on php.net on how to do end a connection but 继续per script. 它涉及产出缓冲和发送<编码>。 HTTP头盔。

http://stackoverflow.com/questions/138374/php-close-a-linkion-early” 。

hm. 如果您的服务器在*nix环境下运行,你可以使用pcntl_fork()在新设立的儿童进程中管理邮件功能,同时继续转机。





相关问题
Angle brackets in php

I want to store angle brackets in a string in PHP because i want to eventually use mail() to send an HTML email out. The following is the code that doesn t seem to work. while(...) { $msg .= "<...

authlogic auto_register feature using my options

I have auto registration working with authlogic using gaizka s version of authlogic_openid which I found on Github since pelle s original addition of the feature seemed to cause issues. http://...

Zend 邮件问题,涉及外国char子+ com子

泽斯德邮局在名称被定为具有外国性质(如“保”)和 com(”)的物品时,就放弃了一种例外(因为邮局(邮局)退回假)。 重新提出以下守则。

How to track an email in Java?

How I can track an email? I m using java on the server side for sending emails. I want to track whether it is delivered , opened, etc... How I can do that ?

Web Link in a mail is not rendering as link in yahoo

string from = "abc@gmail.com"; string to = "xyz@gmail.com,xyz@yahoo.co.in"; string password="abcxyz"; MailMessage mail = new System.Net.Mail.MailMessage(); mail.To.Add(to); mail.From = new ...

SharePoint - Approaching Website Storage Limit Email

How can i go about changing the distribution list as well as the email text for the email that goes out to site collection admin when a site collection approaches it s size limit? Thanks for your ...

How to create an email mailing list

Im creating a coming soon page for a website im developing, and im adding an option for the user to enter their email address so we can email them when the site is up. How do I do this?

CCNet email does not include MSBuild results

We re using CCNet 1.4.4.83 but when an MSBuild task fails, we don t get the MSBuild results (i.e. missing file or whatever reason the compile failed) in the email notification. I do see the build ...

热门标签