1
|
<!DOCTYPE html>
|
2
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
|
3
|
<head>
|
4
|
<meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>
|
5
|
<title>Transfert de panoramique</title>
|
6
|
</head>
|
7
|
<body>
|
8
|
<?php
|
9
|
|
10
|
$dest_dir ='upload';
|
11
|
|
12
|
if(!empty($_POST) && !empty($_FILES)) {
|
13
|
foreach (array_keys($_FILES['files']['name']) as $i) {
|
14
|
if(!empty($_FILES['files']['name'][$i])) {
|
15
|
if(isset($_FILES['files']['error'][$i]) && UPLOAD_ERR_OK === $_FILES['files']['error'][$i]) {
|
16
|
move_uploaded_file($_FILES['files']['tmp_name'][$i],$dest_dir.'/'.basename($_FILES['files']['name'][$i]));
|
17
|
printf("<h2>transfert de %s réalisé</h2>\n", $_FILES['files']['name'][$i]);
|
18
|
} else {
|
19
|
$message = 'Une erreur interne a empêché l\'upload de l\'image : '. $_FILES['files']['error'][$i];
|
20
|
}
|
21
|
} else {
|
22
|
$message = 'Veuillez passer par le formulaire svp !';
|
23
|
}
|
24
|
}
|
25
|
if (isset($message)) {
|
26
|
echo "<h2>$message</h2>\n";
|
27
|
}
|
28
|
}
|
29
|
?>
|
30
|
<p>Pour acceder à la liste des images transférées afin de convertir en panorama <a href="creerPano.php">cliquer ici</a></p>
|
31
|
</body>
|
32
|
</html>
|