Jump to content

Simple Download Script


Bman900

Recommended Posts

u could try this

 

Assume i have put all filetype($filetype) and filename($filename)  in my database

 

$array=mysql_fetch_array($myquery);

$upload=$array['upload'];

$filetype=$array['filetype'];

$mimeType = $filetype;

header('content-disposition: attachment; filename="' . $upload . '"');

header('content-type: ' . $mimeType);

header('content-length: ' . filesize("foldername/{$upload}"));

readfile("foldername/{$upload}");

 

Hope it helps.... :D

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.