Bonjour,
Voici un petit script qui me pose problème.
on peut le lancer à l'adresse :

http://www.observatoiredeleau.fr/phptelechargement.php

le clic sur les liens upload ou download n'initialise pas la variable "action" avec la bonne valeur.
Quelqu'un peut-il m'aider ?
Merci d'avance.
Philou


Le code est le suivant:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
 
<?
$sizelimit = "no"; //Do you want a size limit, yes or no?
$sizebytes = "200000"; //size limit in bytes
$dl = "http://www.observatoiredeleau.fr/56/OBSEAU56_ESSAI/plaquette"; //url where files are uploaded
$absolute_path = "/home//observatoiredele/observatoiredeleau.fr/56/OBSEAU56_ESSAI/plaquette"; 
$websiteurl = "http://www.observatoiredeleau.fr/56/OBSEAU56_ESSAI"; //Url to you website
$websitename = "observatoiredeleau.fr";
 
 
function alert ($message)
{
    echo "<script language=\"Javascript\">";
    echo "alert (\"$message\") </script>";
}
 
 
switch($action) {
 
default:
alert("default");
echo"
<html>
<head>
<title>Upload Or Download</title>
</head>
<body>
<a href=$PHP_SELF?$action=upload>Upload File</a>
<a href=$PHP_SELF?$action=download>Download File</a>
<a href=$websiteurl>Return to $websitename</a>
</body>
</html>";
break;
 
case "download":
alert("download");
break;
 
case "upload":
alert("upload");
break;
}
?>