“PHP Timestamp” Kode Jawaban

Timestamp UNIX dalam PHP

strtotime("now");

// strtotime is a function that will take a string parameter 
// that specifies a date, and returns a unix time stamp bassed
// on that

echo strtotime("2020-02-24");

// prints: 1582502400
by miss american pie

Timestamp PHP


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

Matteoweb

PHP Timestamp


<?php
$date = date_create();
echo date_timestamp_get($date);
?>

Dead Donkey

Waktu PHP

<?php
$t=time();
echo($t . "<br>");
echo(date("Y-m-d",$t));
?>
Funny Fox

Jawaban yang mirip dengan “PHP Timestamp”

Pertanyaan yang mirip dengan “PHP Timestamp”

Lebih banyak jawaban terkait untuk “PHP Timestamp” di PHP

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya