Free CGI Perl PHP Script Olive Design CGI

時刻表示スクリプト

現在の日時、曜日、時間を表示するスクリプトです。

ファイル名time.cgiを作成し、下のソースを貼り付けてパーミションを755にします。

サンプル

ソース time.cgi

#!/usr/bin/perl

($sec,$min,$hour,$day,$mon,$year,$wday) = localtime(time);
@weekday = ("日","月","火","水","木","金","土");
$week = $weekday[$wday];
$mon++;
$year = 1900 + $year;
$date = "$year年$mon月$day日($week)$hour時$min分$sec秒";
print << "TIME";
Content-type: text/html 

<html>
$date
</html>

TIME

exit;

__END__
Perl PHP Free CGI Script OliveDesign CGI

Perl PHP Free CGI Script OliveDesign CGI

プライバシーポリシー / 特定商取引法に基づく表示