【 スクリプト改造依頼スレ 】(丸投げ) part4
■ このスレッドは過去ログ倉庫に格納されています
なんかできたっぽい。8行になっちゃったけど。
#!/usr/local/bin/perl
use CGI":all";sub U{unescape CGI@_}chomp(($d,$b,$c,$s,$q,$_,@w)=<DATA>);chdir$d;
$_=$&if path_info=~m|[^/]+|;tr/\x00- \x7F/ /s;$_=escape CGI$_;-d&¨$/='';open
F,($w=param w)?"+<$_":$_;eval{flock F,2};$t=<F>;if(param w){open
B,">>../$b/$_.old";$t=join("\t",(remote_host,time,$t));$t=~s/\r*\n/<br \/>/g;
print B"$t\n";} seek F,0,0;truncate F,0;print F$w||=$t;opendir D,'.';charset$c;
put header,start_html(-title=>U($_),style=>$s,lang,ja,encoding,$c),ul(map{li""
.localtime((stat)[9]),a{href,url."/$_"},U$_}sort grep!/^\./,readdir D),h1(U$_),
startform(0,url."/$_"),p(textarea(w,$w,@w),submit$q),'</form>',end_html
__DATA__
data_dir
backup_dir
EUC-JP
/cgi/test/7memo/basic.css
save
TestPage
20
70
■ このスレッドは過去ログ倉庫に格納されています