Re: CGIでなくSSIでは無理なのでしょうか。(訂正)


[ Follow Ups ] [ Post Followup ] [ DIGIWEB 日本語Users' BBS ] (PR) [レンタルサーバー]

Posted by 柿花 剛 on May 22日 (1997年) 01時35分27秒:

In Reply to: CGIでなくSSIでは無理なのでしょうか。 posted by 海津 勝 on May 22日 (1997年) 01時01分05秒:

 CGIでもSSIでもPerlのスクリプトなら同じ方法でできますよ。
---------- test.pl ----------
#!/bin/perl
@youbi_j=("Sun","Mon","Tue","Wed","Thu","Fri","Sat");
$ENV{'TZ'} = "JST-9";
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time);
$mon++;
$date_jst=sprintf("%02d/%02d/%02d(%s) %02d:%02d:%02d JST",$year,$mon,$mday,$youbi_j[$wday],$hour,$min,$sec);
print $date_jst;
---------- test.shtml ----------
<html>
<body>
SSIで日本時間を取得するテスト
<hr>
ただいま<!--#exec cmd="perl test.pl"-->です。
<hr>
</body>
</html>
------------------------------
<>は本当は半角です。



Follow Ups:



Post a Followup

名前:
メールアドレス:

題名:

内容:

関連URL:
関連URLのタイトル:
関連画像のURL:


[ Follow Ups ] [ Post Followup ] [ DIGIWEB 日本語Users' BBS ]