'; } else { echo ''; } if(isset($save_path) && $save_path!="") { if(isset($userfile_parent)) { /* * Please refer to the encode_path parameter of Rad Upload * http://www.radinks.com/upload/settings */ $name = str_replace($userfile_parent,"",urldecode($file['name'][$i])); error_log($name); $path ="$save_path" . dirname($name); if(preg_match('/(;)|(\.\.)/',$path)) { echo ""; continue; } if(file_exists($path)) { if(!is_dir($path)) { /* * a file by that name already exists and it's not a directory. * You will need to handle this situation according to your * requirements. You have a range of options including siliently * ingoring this file or rejecting the upload as a whole. */ error_log("file exists $path"); } } else { /* * We need to create a directory. Notice that we are not pretending * to be thread safe here. */ error_log('making path ' . $path); `mkdir -p $path`; } } else { $name = basename($file['name'][$i]); } /* * now we can safely move the file from it's temporary location to a more * permanent home. */ move_uploaded_file($file['tmp_name'][$i], $save_path . $name); } echo '\n"; echo '\n"; } if(! isset($save_path) || $save_path =="") { echo ''; } echo ""; ?>
Files Uploaded
File Name File size
$pathrejected
' . $file['name'][$i] ."' . $file['size'][$i] ."
Files have not been saved, please edit upload.php to match your configuration
Top level folder hint : $userfile_parent

 

Sample PHP Upload handler provided by Rad Inks

 

have you seen our Secure FTP Applet or   our Multimedia Messaging Solution?