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
|
<link rel="stylesheet" media="screen" href="css/index_style.css" />
|
6
|
<title>Transfert de panoramique</title>
|
7
|
</head>
|
8
|
<body>
|
9
|
<?php
|
10
|
|
11
|
$dest_dir ='upload';
|
12
|
|
13
|
if(!empty($_POST) && !empty($_FILES)) {
|
14
|
foreach (array_keys($_FILES['files']['name']) as $i) {
|
15
|
if(!empty($_FILES['files']['name'][$i])) {
|
16
|
if(isset($_FILES['files']['error'][$i]) && UPLOAD_ERR_OK === $_FILES['files']['error'][$i]) {
|
17
|
move_uploaded_file($_FILES['files']['tmp_name'][$i],$dest_dir.'/'.basename($_FILES['files']['name'][$i]));
|
18
|
printf("<h2>transfert de %s réalisé</h2>\n", $_FILES['files']['name'][$i]);
|
19
|
} else {
|
20
|
$message = 'Une erreur interne a empêché l\'upload de l\'image : '. $_FILES['files']['error'][$i];
|
21
|
}
|
22
|
} else {
|
23
|
$message = 'Veuillez passer par le formulaire svp !';
|
24
|
}
|
25
|
}
|
26
|
if (isset($message)) {
|
27
|
echo "<h2>$message</h2>\n";
|
28
|
}
|
29
|
}
|
30
|
?>
|
31
|
<p>Pour acceder à la liste des images transférées afin de convertir en panorama <a href="creerPano.php">cliquer ici</a></p>
|
32
|
</body>
|
33
|
</html>
|