Hallöchen,
könnt ihr mir vielleicht mal ein php-script aufschreiben, dass die Zeit in Sekunden ab einem bestimmten Datum ausgibt. z.B. "Diese Seite exisitiert seit xxxxx Sekunden"
Ich habe keine solche Funktion gefunden.
Danke schön
PHP Zeitanzeige programmieren
-
- Posts: 11
- Joined: 17. Feb 2002 18:13
- Contact:
Re: PHP Zeitanzeige programmieren
Hallo,
lade dir mal folgende Class runter:
<a href="http://www.phpinsider.com/php/code/Date ... 2.4.tar.gz" target="_blank"><!--auto-->http://www.phpinsider.com/php/code/Date ... <!--auto-->
Diese bindest du in dein PHP File ein und:
<blockquote><pre><font size="1" face="">code:</font><hr><font face="Courier New" size="2">
$day1 = "01";
$month1 = "01";
$year1 = "2002";
$day2 = "01";
$month2 = "02";
$year2 = "2002";
$seconds = (((Date_Calc::dateDiff("$day1","$month1","$year1","$day2","$month2","$year2") * 24) * 60) * 60);
</font><hr></pre></blockquote>
Gruß
Thorsten
lade dir mal folgende Class runter:
<a href="http://www.phpinsider.com/php/code/Date ... 2.4.tar.gz" target="_blank"><!--auto-->http://www.phpinsider.com/php/code/Date ... <!--auto-->
Diese bindest du in dein PHP File ein und:
<blockquote><pre><font size="1" face="">code:</font><hr><font face="Courier New" size="2">
$day1 = "01";
$month1 = "01";
$year1 = "2002";
$day2 = "01";
$month2 = "02";
$year2 = "2002";
$seconds = (((Date_Calc::dateDiff("$day1","$month1","$year1","$day2","$month2","$year2") * 24) * 60) * 60);
</font><hr></pre></blockquote>
Gruß
Thorsten