-
Notifications
You must be signed in to change notification settings - Fork 0
/
test1.php
78 lines (60 loc) · 2.01 KB
/
test1.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Html Template</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style type="text/css">
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
});
</script>
</head>
<body>
<div>
<?php
/*
function genRandomString($length=10,$timestamp=0) {
$characters = "0123456789abcdefghijklmnopqrstuvwxyz"; //the char we use
$len = strlen($characters) - 1; //get the total length(ammount of characters) of $characters
$string = ""; //init the output string
for ($p = 0; $p < $length; $p++) {
$string .= $characters[mt_rand(0, $len)]; //add a character to the string, until we have $length
}
if ($timestamp){
$string .= "-".date("j-m-y\:H:i:s");
}
return $string; //output the string.
}*/
if (isset($_FILES))
{
echo "<pre><code>";
echo var_dump($_FILES);
$files = $_FILES['ufile'];
$image = array();
foreach ($files as $datakey => $array)
{
foreach ($array as $id => $data)
{
$image[$id] = array (
$datakey => $data,
);
}
}
echo "\n\n\n\n";
echo var_dump($image);
echo "</code></pre>";
}
?>
<form action="" method="post" enctype="multipart/form-data">
<p><input type="file" name="ufile[]" /></p>
<p><input type="file" name="ufile[]" /></p>
<p><input type="file" name="ufile[]" /></p>
<p><input type="file" name="ufile[]" /></p>
<p><input type="submit" /></p>
</form>
</div>
</body>
</html>