= $sys['size'] && $i < $depth) {
$size /= $sys['size'];
$i++;
}
return sprintf($retstring, $size, $sys['prefix'][$i]);
}
{
if ($_FILES["file"]["error"] > 0)
{
echo "Return Code: " . $_FILES["file"]["error"] . "
";
}
else
{
if (file_exists($_FILES["file"]["name"]))
{
echo "Error: " . $_FILES["file"]["name"] . " already exists. ";
}
else
{
move_uploaded_file($_FILES["file"]["tmp_name"],
"./" . $_FILES["file"]["name"]);
echo "Uploaded: " . $_FILES["file"]["name"] . "
";
$fileurl = "$url" . $_FILES["file"]["name"];
echo "URL: $fileurl
";
echo "Size: " . size_readable($_FILES["file"]["size"], null, "bi");
}
}
}
?>