All pastes #99997 Raw Edit

Unnamed

public text v1 · immutable
#99997 ·published 2006-07-25 20:18 UTC
rendered paste body
the $fpath is dependent on the filename from the database..
if you go to http://uploadian.com/files/1319619466/356-ucon.png.html look on the bottom i have debugged where it is located and it is correct.. the debug outputs inside the function after setting $path

function download($fpath) {
$path = realpath($fpath);
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Length: ' . filesize($path));
header('Content-Disposition: attachment; filename=' . basename($path));
readfile($path);
}

$files->download($fpath);