我目前有一个fwrite,当填写表格时会发生,我想把表格填写在fwrite中的当前日期,我该怎么做?
fwrite($fh, "$firstname\r\n $lastname\r\n $email\r\n $zipcode\r\n $feedback\r\n \r\n");
答案 0 :(得分:4)
试试这样:
$date=date("Y-m-d H:i:s");
fwrite($fh, "$firstname\r\n $lastname\r\n $email\r\n $zipcode\r\n $feedback\r\n $date\r\n \r\n");