I've intalled a java applet ( from infomemtum.com) that allows multiple uploads
see here:
http://www.
but the origianl applet refers to an ASP script (upload,asp)
how can I refer this JAVA applet to a PHP script for processing uploads?
I got this snippet off somewhere ( I thin kit was php.net)
<?
$path_to_file = 'C:\wwwroot\AppletFile\files';
$files = $HTTP_POST_FILES['files'];
if (!ereg("/$", $path_to_file))
$path_to_file = $path_to_file."/";
foreach ($files['name'] as $key=>$name) {
if ($files['size'][$key]) {
// clean up file name
$name = ereg_replace("[a-z0-9.]", "",
str_replace(" ", "",
str_replace("%20", "_", strtolower($name)
)
)
);
$location = $path_to_file.$name;
while (file_exists($location))
$location .= ".copy";
copy($files['tmp_name'][$key],$location);
unlink($files['tmp_name'][$key]);
echo "\n
Successfully uploaded file: $name.";
}
}
?>
but I get an error:
Warning: Invalid argument supplied for foreach() in /home/acvb/www/www/AppletFile/upload.php on line 7
Attached is the original upload.ASP file
Can anyone help with this?
Thanks in advance