Ouvrir un fichier Html avec Perl
Bonjour tout le monde,
Je crée un fichier Html avec un logiciel ensuite je souhaite ouvrir celui-ci avec Perl. Mais, il m'affiche le message d'erreur : "ERROR: unable to open the Html File".
Code:
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; |
Pourtant ma variable "$webout" se réfère bien à un chemin contenant un fichier Html : "C:\Users\Ash_Rmy\Documents\00-Fox.D________________\00-ExecDistant\p158\aaaa.html".
Merci de votre aide.
ash_rmy.