Here's what I did
download.php:
<?php
$path = $_GET['file'];
header("Content-Description: File Transfer");
header("Content-Type: application/force-download");
header("Content-Disposition: attachment; filename=\"" . basename($path . $uri[1]) . "\"" );
@readfile($_GET['file']);
?>
html file:
<script>
function downloadme(file){
var link = "download.php?file=" + escape(file);
location.replace(link);
}
</script>
<a title="Click to download" href="javascript:downloadme('test&12.doc')">filename</a>