0

我目前有一个 fwrite 下面会在填写表格时发生,我想将表格填写的当前日期放在 fwrite 中,我该怎么做?

fwrite($fh, "$firstname\r\n $lastname\r\n $email\r\n $zipcode\r\n $feedback\r\n \r\n");
4

1 回答 1

5

试试这样:

$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");
于 2012-10-22T09:59:30.763 回答