Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
以下の形式で現在のタイムスタンプを取得するためにphpを手伝ってくれる人はいますか。
2013-05-11 18:00:00
以下の私の現在の試み:
$todaysDate = date('Y-m-d\h:i:s', strtotime('+0 day',time()));
出力中:
2013-05-03h:24:16
このフォーマットを試してください:
date("Y-m-d H:i:s");
日付関数のデフォルト値は現在の日付と時刻です
バックスラッシュなしで試すとどうなりますか?
$todaysDate = date('Y-m-d h:i:s', strtotime('+0 day',time()));