#!/usr/local/bin/perl # ###################################################################### ### ### ### CGI更新時刻取得 T-Updated Ver.1.00 ### ### (c) 1996-1999 Takahiro Nishida ### http://www.mytools.net/ ### ### ###################################################################### # ###(変数設定部)詳細は上記ページをご覧下さい。###################### $tpfile = "/full/path/of/tp.html"; $htmlfile = "/full/path/of/output.html"; $page = "http://your.provider/path/of/output.html"; $files{'top'} = "/index.html"; $files{'link'} = "/link.html"; $files{'page1'} = "/page1/index.html"; ###(変数設定部)ここまで######################################### while (($name, $path) = each %files){ @t = stat($path); local($sec, $min, $hour, $mday, $mon, $year) = localtime($t[9]); $mon++; $year += 1900; ##### 年月日時秒分で表示する場合はこちらの頭の「#」を取って下さい。 $modify = sprintf("%04d/%02d/%02d %02d:%02d:%02d", $year, $mon, $mday, $hour, $min, $sec); ##### 年月日のみで表示させる場合は下行の頭の「#」を取って下さい。 # $modify = sprintf("%04d/%02d/%02d", $year, $mon, $mday); $UPT{$name} = $modify; } open(FILE,"$tpfile") || die $!; @htmls = ; close(FILE); open(FILE,">$htmlfile") || die $!; foreach (@htmls){ s//$UPT{$1}/g; print FILE; } close(FILE); print "Location: $page\n\n";