1 Byte = 8 Bit 1 Kilobyte = 1024 Bytes 1 Megabyte = 1048576 Bytes 1 Gigabyte = 1073741824 Bytes
echo "Memory Usage: " . (memory_get_usage()/1048576) . " MB \n";
1 Byte = 8 Bit 1 Kilobyte = 1024 Bytes 1 Megabyte = 1048576 Bytes 1 Gigabyte = 1073741824 Bytes
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<form action="my_parser.php" method="post" enctype="multipart/form-data">
<p><input type="file" name="file_array[]"></p>
<p><input type="file" name="file_array[]"></p>
<p><input type="file" name="file_array[]"></p>
<input type="submit" value="Upload all files">
</form>
</body>
</html>
my_parser.php
<?php
// http://www.youtube.com/watch?v=7fTsf80RJ5wif(isset($_FILES['file_array'])){
$name_array = $_FILES['file_array']['name'];
$tmp_name_array = $_FILES['file_array']['tmp_name'];
$type_array = $_FILES['file_array']['type'];
$size_array = $_FILES['file_array']['size'];
$error_array = $_FILES['file_array']['error'];
for($i = 0; $i < count($tmp_name_array); $i++){
if(move_uploaded_file($tmp_name_array[$i], "test_uploads/".$name_array[$i])){
echo $name_array[$i]." upload is complete<br>";
} else {
echo "move_uploaded_file function failed for ".$name_array[$i]."<br>";
}
}
}
?>
Hello Friends! I am Ramana a part time blogger from Hyderabad.