Simple code for downloading files
Place this code in a php file and make links to it. That links will be act as download link for the file .
<?php
$filename="left.txt";
$type=filetype($filename);
header("Content-type: $type");
header("Content-Disposition: attachment;filename=$filename");
header("Content-Transfer-Encoding: binary");
header('Pragma: no-cache');
header('Expires: 0');
// Send the file contents.
set_time_limit(0);
//readfile($file);
?>
Download files with php script example
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment