我的问题
我用了网上提供的那个很经典的程序,服务器也没什么错误,怎么就是传不上去呢?程序给大家
#!/usr/bin/perl
#######################################
## perl services upload helper v1.0 ##
## http://www.perlservices.com ##
## perlservices@perlservices.com ##
## ###########################################
## you should carefully read all of the following terms and conditions ##
## before using this program. your use of this software indicates your ##
## acceptance of this license agreement and warranty. ##
## this program is being distributed as freeware. it may be used ##
## free of charge, but not modified below the line specified. this copyright ##
## must remain intact. ##
## ##
## by using this program you agree to indemnify perl services from any ##
## liability. ##
## ##
## selling the code for this program without prior written consent is ##
## expressly forbidden. obtain permission before redistributing this ##
## program over the internet or in any other medium. in all cases the ##
## copyright must remain intact. ##
## ##
## there are security hazards involved with this script. read the readme file##
## before using the script. ##
################################################################################
##
## start setting up options here:
## your path to where you want your files uploaded.
## note: no trailing slash
$basedir = "/home/ylbai/";
## do you wish to allow all file types? yes/no (no capital letters)
$allowall = "yes";
## if the above = "no"; then which is the only extention to allow?
## remember to have the last 4 characters i.e. .ext
## $theext = ".jpg";
## the page you wish it to forward to when done:
## i.e. http://www.mydomainname.com/thankyou.html
$donepage = "http://172.171.85.78";
################################################
################################################
## do not edit or copy below this line ##
################################################
################################################
use CGI;
$onnum = 1;
while ($onnum != 11) {
my $req = new CGI;
my $file = $req->param("FILE$onnum");
if ($file ne "") {
my $fileName = $file;
$fileName =~ s!^.*(\\|\/)!!;
$newmain = $fileName;
if ($allowall ne "yes") {
if (lc(substr($newmain,length($newmain) - 4,4)) ne $theext){
$filenotgood = "yes";
}
}
if ($filenotgood ne "yes") {
open (OUTFILE, ">$basedir/$filename");
print "$basedir/$filename<br>";
while (my $bytesread = read($file, my $buffer, 1024)) {
print OUTFILE $buffer;
}
close (OUTFILE);
}
}
$onnum++;
}
print "content-type: text/html\n";
print "location:$donepage\n\n";