在codeigniter中如何在到期7天之前发送自动消息 [英] In codeigniter how to send automatic messages before 7 days of expiry
本文介绍了在codeigniter中如何在到期7天之前发送自动消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在codeigniter中如何在到期前7天发送自动消息
我尝试过:
没试过。不知道该怎么办解决方案
为此目的使用cron Job。
创建一个类并每天用该cron调用一个方法。
和日期比较使用低于日期
使用PHP提供的strtotime方法。
日期('Y-m-d',strtotime(' - 7天'))
in codeigniter how to send automatic messages before 7 days of expiry
What I have tried:
nothing tried.dont know what to do
解决方案 use cron Job for this purpose .
Create a class and call a method with that cron once every day .
and for dates comparison use below date
Use the strtotime method provided by PHP.
date('Y-m-d', strtotime('-7 days'))
这篇关于在codeigniter中如何在到期7天之前发送自动消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文