七行プログラミング (452レス)
七行プログラミング http://medaka.5ch.net/test/read.cgi/php/1036141603/
上
下
前
次
1-
新
通常表示
512バイト分割
レス栞
172: nobodyさん [] 03/12/01 06:28 ID:i/vnv4B8 訂正。HTML&&桁数間違えてた。 #!/usr/bin/perl use CGI':all';use File::Find;@i=split'/',path_info;shift@i;($y,$m,$d)=grep/^\d+ $/x,@i;$p=join'/',grep{/^\D+$/}@i;find sub{($f=$File::Find::name)=~/\.txt$/and$ e{$f}=-M},"./$p";put header,start_html;for(sort{$e{$a}<=>$e{$b}}keys%e){($z,$x, $c)=(localtime(time-86400*$e{$_}))[5,4,3];if(!(($y&&$y!=$z+1900)or($m&&$m!=$x+1 )or($d&&$d!=$c))&&-f&&open F,$_){s/^\.\///;chomp($t=<F>);put hr,h2 a({href,url. "/$_"},$t),pre<F>,"\n";close F}}put end_html - データ用のディレクトリをカレントディレクトリ以外に指定したい場合。 ln -s /home/your/data/path home とリンクを作り。 7blosxom.cgi/home とアクセスする。 http://medaka.5ch.net/test/read.cgi/php/1036141603/172
メモ帳
(0/65535文字)
上
下
前
次
1-
新
書
関
写
板
覧
索
設
栞
歴
あと 280 レスあります
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.011s