bestanden sorteren op datum
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>bestand uploaden</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<BODY BGCOLOR="000000">
<FONT COLOR="FFFFFF">
hier kan je bestanden uploaden.voor meerdere bestanden vul je het getal in en druk je op aantal bestanden.
<br>
druk dan op browse en selecteer de gewenste bestanden.
<br>
druk dan op uploaden.Je bestanden worden dan verzonden (dit kan wel even duren afhankelijk van het aantal bestanden en de grootte ervan.)
<br>
Code (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
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
<?php
error_reporting(E_ALL);
$map = "./upload/"; // Map waar alles terecht komt
function upload_file($fTmp, $fNew) {
if(file_exists($fNew)) {
return false;
} else {
copy($fTmp, $fNew);
return true;
}
}
if(IsSet($_POST['submit'])) {
for($i = 0; $i < count($_FILES['bestand']['name']); $i++) {
if(IsSet($_FILES['bestand']['name'][$i]) && is_uploaded_file($_FILES['bestand']['tmp_name'][$i])) {
if(!upload_file($_FILES['bestand']['tmp_name'][$i], $map.$_FILES['bestand']['name'][$i])) {
$error = true;
}
}
}
if(IsSet($error)) {
echo "Er ging iets mis!";
} else {
echo "Het is gelukt!!";
}
} else {
if(IsSet($_POST['aantal'])) {
$aantal = $_POST['aantal'];
} else {
$aantal = 1;
}
?>
error_reporting(E_ALL);
$map = "./upload/"; // Map waar alles terecht komt
function upload_file($fTmp, $fNew) {
if(file_exists($fNew)) {
return false;
} else {
copy($fTmp, $fNew);
return true;
}
}
if(IsSet($_POST['submit'])) {
for($i = 0; $i < count($_FILES['bestand']['name']); $i++) {
if(IsSet($_FILES['bestand']['name'][$i]) && is_uploaded_file($_FILES['bestand']['tmp_name'][$i])) {
if(!upload_file($_FILES['bestand']['tmp_name'][$i], $map.$_FILES['bestand']['name'][$i])) {
$error = true;
}
}
}
if(IsSet($error)) {
echo "Er ging iets mis!";
} else {
echo "Het is gelukt!!";
}
} else {
if(IsSet($_POST['aantal'])) {
$aantal = $_POST['aantal'];
} else {
$aantal = 1;
}
?>
<form action="" method="post">
<input type="text" name="aantal" value="" size="1"> <input type="submit" name="aantal_submit" value="Aantal bestanden">
</form>
<form action="" method="post" enctype="multipart/form-data">
Bestand : <input type="file" name="bestand[]"> <br>
<br><br>
<input type="submit" name="submit" value="Uploaden">
</form>
</FONT>
</body>
</html>
dit is de code van het upload systeem
de code die ik nodig heb gaat over de direction
zouden jullie mij willen helpen?
mvg koen
bedankt voor de snelle rectie