Converting CGI+Perl to PHP Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Members , 

 Any body can convert this CGI+Perl script to PHP for me . 
I will appropriation if someone can do that for me . 

Thanks
Ali

----------------------------------------------------
#!c:/perl/bin/perl.exe -w 
my $upload_dir = "E:/LiveServer/Apache/htdocs/Public_html/camImg/";

print "Content-Type: text/plain\r\n\r\n";
print "Upload OK\r\n";

my $file_name = $ENV{'HTTP_CONTENT_DISPOSITION'};
$file_name =~ s/^attachment; filename=\"(.*)\"$/$1/;

open (IMG_FILE, "> $upload_dir$file_name") or die "can't open
>$upload_dir$file_name";
binmode(IMG_FILE);
while (<STDIN>) {

print IMG_FILE $_;

}
chmod 0666, "$upload_dir$file_name";

exit 0;
 -------------------------------------------------




[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux