English 中文(简体)
PHP 日期/到期日期 [闭门会议]
原标题:PHP date/due date [closed]
  • 时间:2011-11-17 17:14:36
  •  标签:
  • php

我要求一个algo/idea解决我的问题。 情况是:

  • due date is Nov 21, 2011
  • current date is Nov 18, 2011
  • 3 days before the due date, I want an image to appear on the div [days is dynamic]

因此,第18号,2011年,四版已经成像,第二天,新19号,2011年,四版在2011年20号创新上的形象和相同情景。 但截至2011年11月17日,无遗体形象。

我如何用购买力平价来做到这一点? 不要忘记四分五裂的形象。 我这样做了。 只是日期的条件。

anyone who can give me algo/idea? only algo/idea.. Thanks, Justin

最佳回答
问题回答

http://www.php.net/manual/en/Function.time.php“rel=“nofollow” http://www.php.net/manual/en/Function.time.php!

例1

<?php
$nextWeek = time() + (7 * 24 * 60 * 60);
                   // 7 days; 24 hours; 60 mins; 60secs
echo  Now:        . date( Y-m-d ) ."
";
echo  Next Week:  . date( Y-m-d , $nextWeek) ."
";
// or using strtotime():
echo  Next Week:  . date( Y-m-d , strtotime( +1 week )) ."
";
?>

:





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签