Egy egyszerü fájlfeltöltés funkction, random névkiegészítéssel.
function FileUpload($file, $dir)
{
$random=rand(1000000000,10000000000);
foreach($_FILES as $allomanynev => $all_tomb)
{
if (is_uploaded_file($all_tomb['tmp_name']))
{
move_uploaded_file($all_tomb['tmp_name'],"$dir".$random."$all_tomb[name]") or die("A filefeltlts nem sikerlt.");
}
}
$fileName = $random.$_FILES['clogo']['name'];
return $fileName;
}





