= $sys['size'] && $i < $depth) { $size /= $sys['size']; $i++; } return sprintf($retstring, $size, $sys['prefix'][$i]); } // Respect HTTPS or not if (isset($_SERVER['HTTPS'])) { $url = preg_replace("/^http:\/\//", "https://", $url); } else { $url = preg_replace("/^https:\/\//", "http://", $url); } { 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"); } } } ?>

Back to index