需要在php脚本中使用用户的本地时间发送电子邮件--我如何从JS获取数据并在我的PHP中使用?
理想情况下,这会让我有足够的时间:
var now = new Date();
var hrs = now.getHours();
var msg = "";
if (hrs > 0) msg = "Mornin' Sunshine!"; // REALLY early
if (hrs > 6) msg = "Good morning"; // After 6am
if (hrs > 12) msg =