开发者

Send message from server at specific time in php?

Is there any way to send mail at specific time in php?

Please give me hint for that file. I forget to that file which is u开发者_StackOverflow社区sed to send mail to specific time.


You want to use cron.php this is file name i think you forget that name right?


For that you should use a cron job. Cron may be used to launch scripts of any sort (in your case a phpscript). The usage is pretty simple.


Look up CRON jobs. A CRON job runs a specific php file at a certain time. Other than that there's no way to schedule an email in PHP (afaik).


Unfortunately you can't do this with only PHP. You would need to run a cron which would then run the specific PHP script. If you want to send the mail at the same time each day, then you would run the cron at that time each day and the PHP script would then send your email.


Note that cron jobs can be easily configured at your Cpanel ( if you have one )

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜