UNKNOWN
//**************************************
// Name: Another way to Upload
// Description:Uploads up to 5 files user PHP, works perfectly on win32 servers such as IIS or Apache for windows. Demonstrates the use of copy(), functions, and switch operators.
// By: Steve Oliver
//
//
// Inputs:$destination should be set to where you want the files uploaded to.
//
// Returns:None
//
//Assumes:None
//
//Side Effects:None
//This code is copyrighted and has limited warranties.
//Please see http://www.Planet-Source-Code.com/xq/ASP/txtCodeId.285/lngWId.8/qx/vb/scripts/ShowCode.htm
//for details.
//**************************************
function uploadProg($filename1,$filename1_name,$filename2,$filename2_name,$filename3,$filename3_name,$filename4,$filename4_name,$filename5,$filename5_name){
########Set the destination here##############
$destination="C:\\Uploads\\";
copy($filename1,$destination."/".$filename1_name);
copy($filename2,$destination."/".$filename2_name);
copy($filename3,$destination."/".$filename3_name);
copy($filename4,$destination."/".$filename4_name);
copy($filename5,$destination."/".$filename5_name);
echo "File(s) Uploaded...
";
echo "$filename1_name was uploaded succesfully.
";
echo "$filename2_name was uploaded succesfully.
";
echo "$filename3_name was uploaded succesfully.
";
echo "$filename4_name was uploaded succesfully.
";
echo "$filename5_name was uploaded succesfully.
";
echo "Click here to go back.";
}
function main(){?>
}
switch ($action){
default:
main();
break;
case "uploadProg":
if ($filename1=="none") {echo("No File Selected....
"); break;}
uploadProg($filename1,$filename1_name,$filename2,$filename2_name,$filename3,$filename3_name,$filename4,$filename4_name,$filename5,$filename5_name);
break;
}
?>