Downloaded files and PHPCodePut the page in the same directory
<AHref= "Word. php? File = Help & type = Doc">Download broadband troubleshooting Manual</A>
Below is the word. PHP page
01. If (! Isset (Get ["file"]) |! Isset (Get ["type" ]) { 02. Print "No file selsect "; Exit (); 03. } 04. $ File = Get ["file"]. ".". Get ["type" ]; 05. If (@ $ Fp = Fopen ( $ File , 'R' )){ 06. Header ("Content-Type: octet/stream" ); 07. If ( Strstr (Server ["http_user_agent"], "MSIE" )){ 08. Header ("Content-Disposition: filename =" .mb_convert_encoding('broadband user Fault Diagnosis manual .doc ', 'gb2312', 'utf-8 ')); // For IE 09 .} Else { 10. Header ("Content-Disposition: attachment; filename =" .mb_convert_encoding('broadband user Fault Diagnosis manual .doc ', 'gb2312', 'utf-8 ')); // For other browsers 11 .} While (! @ Feof ( $ Fp )){ 12. Echo Fread ( $ Fp , 1024 ); 13. } 14. // @ Fpassthru ($ FP ); 15. Exit (); 16 .} Else { 17. Print "This file does not exist"; 18 .}