1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| # forward the SAS program's output
if(open (SASOUTFILE, "$webout")){
print "Content-type:text/html\n\n";
binmode(SASOUTFILE); # In case there are graphics, explicitly specify binary mode for WIN32
$nread = read(SASOUTFILE,$chunk,1024);
while ($chunk ne ""){
print ($chunk);
$nread = read(SASOUTFILE,$chunk,5000);
}
close SASOUTFILE;
} else {
CgiDie("ERROR: unable to open the Html File");
}
#unlink ("$saslog"); #clean up temp files
#unlink ("$sasfile");
#unlink ("$webout");
exit; |
Partager