日期:2011-11-22  浏览次数:20432 次

PHP通过Header()函数实现文件下载,如下代码:

  1. <html> 
  2. <head> 
  3. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> 
  4. <title>应用header()函数实现下载 - www.cxybl.com</title> 
  5. <style type="text/css"> 
  6. <!-- 
  7. body { 
  8.     margin-left: 00px; 
  9.     margin-top: 0px; 
  10.     margin-right: 0px; 
  11.     margin-bottom: 0px; 
  12. a:link { 
  13.     text-decoration: none; 
  14. a:visited { 
  15.     text-decoration: none; 
  16. a:hover { 
  17.     text-decoration: none; 
  18. a:active { 
  19.     text-decoration: none; 
  20. .style1 {font-size: 12px} 
  21. --> 
  22. </style></head> 
  23.  
  24. <body> 
  25. <table width="385" height="185" border="0" cellpadding="0" cellspacing="0"> 
  26.     <form name="form1" <