Bonjour,
Je voudrais qu'un telechargement se lance lorque je clic sur un lien :
code HTML:
Voici le code php de telecharger.php :
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
44
45
46
47
48
49
50
51
52
53
54
55
56 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <?php include ("./compteur-live/compteur-live.php"); ?> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>Site de Fan | Los Globos</title> <meta http-equiv="Content-Type" content="application/xhtml+xml" /> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" type="text/css" media="screen" href="main.css" /> </head> <body> <div id="pageBody"> <div id="outer-container"> <div id="container"> <div id="header"> <a href="http://www.losglobos.fr"><div id="headerLeft"></div></a> <div id="headerRight"><h1>Toutes les videos de<br /><span class="highlight">LOS GLOBOS</span></h1></div> </div> <div id="headerNav"> <div id="centerNav"> <ul> <li><a href="index.php">Home</a></li> <li id="current"><a href="Orleans.php">Orleans</a></li> <li><a href="Verneuil.php">Verneuil</a></li> <li><a href="Azay.php">Azay sur Indre</a></li> </ul> </div> </div> <div id="content"> <div align='center'> Video concert de los globos a Orleans(45) : <br> <a href="telechargement.php?fichier=Orleans_1.MOV">Orléans 1</a><br> <a href="telechargement.php?fichier=Orleans_2.MOV">Orléans 2</a><br> <a href="telechargement.php?fichier=Orleans_3.MOV">Orléans 3</a><br> <a href="telechargement.php?fichier=Orleans_4.MOV">Orléans 4</a><br> <a href="telechargement.php?fichier=Orleans_5.MOV">Orléans 5</a><br> <a href="telechargement.php?fichier=Orleans_6.MOV">Orléans 6</a><br> <a href="telechargement.php?fichier=Orleans_7.MOV">Orléans 7</a><br> <a href="telechargement.php?fichier=Orleans_8.mpg">Orléans 8</a><br><br> </div> Et pour tous ceux qui ne savent comment on fait la chouille chez les JOC : <I><H3>Bientot les Videos...</H3></I> </div> <div id="footer"> © Copyright LosGlobos 2007, All Rights Reserved. </div> </div> </div> <P align=CENTER><script type="text/javascript" src="http://www.abcompteur.com/cpt/?code=4/5/7135/5/1&ID=227709"></script><P> </div> </body> </html>
et voila ce que cela me retourne
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 <?php $fichier = $_GET['fichier']; echo $fichier; header('Content-disposition: attachment; filename="' . basename($fichier) . '"'); header('Content-type: application/octetstream'); header('Pragma: no-cache'); header('Expires: 0'); readfile($fichier); ?>
Merci de votre aideOrleans_1.MOV
Warning: Cannot modify header information - headers already sent by (output started at /mnt/146/sda/1/8/audran12/telechargement.php:4) in /mnt/146/sda/1/8/audran12/telechargement.php on line 5
Warning: Cannot modify header information - headers already sent by (output started at /mnt/146/sda/1/8/audran12/telechargement.php:4) in /mnt/146/sda/1/8/audran12/telechargement.php on line 6
Warning: Cannot modify header information - headers already sent by (output started at /mnt/146/sda/1/8/audran12/telechargement.php:4) in /mnt/146/sda/1/8/audran12/telechargement.php on line 7
Warning: Cannot modify header information - headers already sent by (output started at /mnt/146/sda/1/8/audran12/telechargement.php:4) in /mnt/146/sda/1/8/audran12/telechargement.php on line 8
Partager