如何在php的特定日子发送? [英] How to send on a specific day in php?

查看:137
本文介绍了如何在php的特定日子发送?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要一张电子贺卡或类似的东西。用户可以选择电子贺卡,选择后,必须输入名称(来往),电子邮件(往返)等信息,我想让用户选择发送电子贺卡的日期。



如何在特定的日子发送电子贺卡?我需要编写一个每一个新的一天运行的脚本?怎么做?对不起,我是新来的php ...(但不是初学者,甚至不知道如何执行mysql查询,从url等获取消息)

解决方案

是的,你需要一个每天运行的脚本。 (禁止可笑的操作,例如试图通过检查Web请求来伪造这个问题。)在Unix上下文中执行此操作的常用方法称为 cron作业;如果您的托管服务提供商是基于Unix的,那么您应该查看他们为您提供的cron作业提供了什么。在Windows上有一个名为Scheduled Tasks的并行服务。


I want to a e-cards or something like that. The user can choose the e-cards, after chosen, he must enter the some fields like name(to and from), email(to and from), message and I want to let user to choose which date to send the e-cards.

How to send the e-cards on specific day? I need to write a script that run every new day? How to do that? Sorry, I am new to php... (but not beginner like not even know how to execute mysql query, get message from url etc)

解决方案

Yes, you need a script that runs every day. (Barring ridiculous maneuvers like trying to fake this by checking on Web requests.) The usual way to do this in a Unix context is called a cron job; if your hosting provider is Unix-based, you should look into what they provide for making cron jobs available to you. On Windows there's a parallel service called Scheduled Tasks.

这篇关于如何在php的特定日子发送?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆