<?php $langfile = "mon_fichier.avi"; header("Content-Type: octet-stream"); header("Content-Length: ".filesize ($langfile) ); header("Content-Disposition: attachment; filename=$langfile"); include($langfile); ?>
<style> a { cursor:url("Autres/cursor/main.cur"); }
<!-- <form method="post" action="test2.php"> Télécharger le fichier : <select size="1" name="Langage"> <option value="compteur.php">compteur.php</option> <option value="mail.php">mail.php</option> <option value="index.php">index.php</option> </select> </form> !--> Ou pour la fonction avec l'url : [test2.php?id=mail.php Télécherger le fichier mail.php]
<?php // Pour la methode POST //$langfile= $_POST['id']; // Pour la methode du passage dans l'url //$langfile = $_GET['id']; header("Content-Type: octet-stream"); header("Content-Length: ".filesize ($langfile) ); header("Content-Disposition: attachment; filename=$langfile"); include($langfile); ?>
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question