cgi の変更点   

  • 追加された行はこの色です。
  • 削除された行はこの色です。
  • cgi へ行く。

[[FrontPage]]

#pre{{

#!C:/Perl/bin/perl.exe

$file = "output.png";
$len = -s $file;

if ($len == 0 ){
    printf "Content-type: text/html;\n\n";
    printf "%s<BR>",`ls`;
    printf "no such file. %s",`ls -la ./`;
    exit;
}

printf "Content-type: image/png\n";
printf "Content-length: %d\n\n",$len;

binmode STDOUT;
open(DATA,$file);
binmode DATA;
read(DATA,$buf,$len); 
print $buf;
close(DATA);

exit;

}}