七行プログラミング (452レス)
上
下
前
次
1-
新
251
(1)
: 04/02/22 23:23 ID:???
AA×
>>-
>>-
>>-
[240|
320
|
480
|
600
|
100%
|
JPG
|
べ
|
レス栞
|
レス消
]
251: [sage] 04/02/22 23:23 ID:??? 7wiki と 7uploader 。どちらも shebang 無し七行ルールじゃないと辛いですな。 use CGI":all";charset$c='EUC-JP';$w='\b(([A-Z][a-z]+){2,})';$f=script_name;$/=( );($p)=(path_info||FrontPage)=~/$w/;if(open F,($m=param z)?">$p":$p){eval{flock F,2};print F$m||=<F>;close F}param(d)eq"D"&&unlink$p;$_=pre(escapeHTML$m).hr.ul map{li"".localtime((stat)[9]),$_}sort{-M$a<=>-M$b}grep/^$w$/&-f,<*>;s|$w|(!-f$1 &&$1).a{href,"$f/$1"},-f$1?$1:"?"|eg;put header,start_html(-title=>$p,encoding, $c,lang,ja),h1($p),startform(0,"$f/$p"),p(textarea(z,$m,6,60),br,map{submit d,$ _}Write,Delete),endform,hr,$_,end_html ・削除機能の実装案。 use CGI":all";$CGI::POST_MAX=1024000;$/=\4096;sub v{open(F,pop)||die;binmode F} chdir D;if($f=upload f){$f=~/\.\w+$/;v">".time.$&;print F$_ while<$f>;close F}$ i++<20?push@f,$_:unlink for sort{-M$a<=>-M$b}<*>;($_=param d)?(v($_),put header (-Content_length=>-s,attachment,$_,Type,'application/octet-stream'),<F>):put( header,start_html,start_multipart_form,filefield(f),submit,endform,hr,table({ border,1},Tr[th([qw/name date size/]),map{td([a({href,"?d=$_"},$_),''.localtime ((stat)[9]),-s])}@f]),end_html) ・ファイル名を time に。 ・最大保存数を設定可能に。 http://medaka.5ch.net/test/read.cgi/php/1036141603/251
と どちらも 無し七行ルールじゃないと辛いですな 削除機能の実装案 ファイル名を に 最大保存数を設定可能に
上
下
前
次
1-
新
書
関
写
板
覧
索
設
栞
歴
あと 201 レスあります
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
ぬこの手
ぬこTOP
0.045s