Ik heb dus een site en daar moeten dus bestanden naar geup'ed en van gedownload kunnen worden.
Nu heb ik heel mooi allemaal files in de database gestopt, maar mijn download-script wil niet lukken. Ik krijg elke keer als filename download.php, terwijl dit anders moet zijn.
Code download.php:
Wat doe ik nou fout? Ik heb me al helemaal rot gezocht, maar elke keer krijg ik gelijksoortige scripts te zien.
Nu heb ik heel mooi allemaal files in de database gestopt, maar mijn download-script wil niet lukken. Ik krijg elke keer als filename download.php, terwijl dit anders moet zijn.
Code download.php:
code:
1
2
3
4
5
6
7
8
9
10
11
| <? include('connect.php'); include('functions.php'); $ID = $_GET['ID']; $query="SELECT * FROM tabdb_bin WHERE ID = $ID"; $binary = mysql_fetch_array(mysql_query($query)); $binary['Name']=str_replace(" ","%20",$binary['Name']); Header("Content-type: ".$binary['Type']); echo $binary['Data']; ?> |
Wat doe ik nou fout? Ik heb me al helemaal rot gezocht, maar elke keer krijg ik gelijksoortige scripts te zien.
Engineering is like Tetris. Succes disappears and errors accumulate.