php에서 오늘 날짜 구하기
$today = getdate(mktime());
$e_year = $today[year];
if($today[mon] < 10)
{
$e_month = "0".$today[mon];
} else {
$e_month = $today[mon];
}
if($today[mday] < 10)
{
$e_day = "0".$today[mday];
} else {
$e_day = $today[mday];
}
$e_visitdate = $e_year."-".$e_month."-".$e_day;
$today = getdate(mktime());
$e_year = $today[year];
if($today[mon] < 10)
{
$e_month = "0".$today[mon];
} else {
$e_month = $today[mon];
}
if($today[mday] < 10)
{
$e_day = "0".$today[mday];
} else {
$e_day = $today[mday];
}
$e_visitdate = $e_year."-".$e_month."-".$e_day;