Hi to all,
I have a simple script to write something in to a file and read from the file.But it gives Permission Denied error
My Script
[CODE=perl]#!C:\Program Files\SWsoft\Pl esk\Additional\ Perl\bin\perl.e xe
use CGI::Carp 'fatalsToBrowse r';
use strict;
use warnings;
use CGI;
my $file="C:/Inetpub/vhosts/imi.in/cgi-bin/elearning/query/1.html";
chmod(0755,'C:/Inetpub/vhosts/imi.in/cgi-bin/elearning/query/');
open(FH,">$file ") or die $!;
print FH "Rajiv";
close(FH);
open(FH,"$file" ) or die $!;
my @array=<FH>;
close(FH);
print "Content-type:text/html\n\n";
print "Value=@arr ay";
exit;[/CODE]
I am using Windows 2003 IIS 6.0 and Perl 5.8.8
my error
Permission denied at C:\Inetpub\vhos ts\imi.in\cgi-bin\elearning\q uery\file_test. pl line 9.
Please help on this
Regards
Rajiv
I have a simple script to write something in to a file and read from the file.But it gives Permission Denied error
My Script
[CODE=perl]#!C:\Program Files\SWsoft\Pl esk\Additional\ Perl\bin\perl.e xe
use CGI::Carp 'fatalsToBrowse r';
use strict;
use warnings;
use CGI;
my $file="C:/Inetpub/vhosts/imi.in/cgi-bin/elearning/query/1.html";
chmod(0755,'C:/Inetpub/vhosts/imi.in/cgi-bin/elearning/query/');
open(FH,">$file ") or die $!;
print FH "Rajiv";
close(FH);
open(FH,"$file" ) or die $!;
my @array=<FH>;
close(FH);
print "Content-type:text/html\n\n";
print "Value=@arr ay";
exit;[/CODE]
I am using Windows 2003 IIS 6.0 and Perl 5.8.8
my error
Permission denied at C:\Inetpub\vhos ts\imi.in\cgi-bin\elearning\q uery\file_test. pl line 9.
Please help on this
Regards
Rajiv
Comment