2012年12月27日木曜日

開発環境

『初めてのPHP5』 (David Sklar 著、 桑村 潤 翻訳、 廣川 類 翻訳、 オライリー・ジャパン、2005年、ISBN978-4-87311-257-2)の9章(日付と時刻の取り扱い)9.6(演習問題)1を解いてみる。

1.

HTML、PHPのソースコード(BBEdit)

sample104.php

<?php
  $timestamp = mktime(19, 45, 0, 10, 20, 2004);
  print strftime("Toay is day %d of %B and day %j of the year %Y. The time is %I:%M %p<br />
    (also known as %H:%M)." , $timestamp);
?>

0 コメント:

コメントを投稿