header("Content-type: text/plain");
?~~

解决方案 »

  1.   

    哪里可以查到Content-type:的列表?
      

  2.   

    Mon May 29 09:21:27 2006 正在连接 172.16.146.244 [IP=172.16.146.244:80]
    Mon May 29 09:21:27 2006 已连接.
    Mon May 29 09:21:27 2006 GET /bt/page_getfile.php HTTP/1.1
    Mon May 29 09:21:27 2006 Host: 172.16.146.244
    Mon May 29 09:21:27 2006 Accept: */*
    Mon May 29 09:21:27 2006 Referer: http://172.16.146.244/bt
    Mon May 29 09:21:27 2006 User-Agent: Mozilla/4.0 (compatible; MSIE 5.00; Windows 98)
    Mon May 29 09:21:27 2006 Pragma: no-cache
    Mon May 29 09:21:27 2006 Cache-Control: no-cache
    Mon May 29 09:21:27 2006 Connection: close
    Mon May 29 09:21:27 2006 HTTP/1.1 200 OK
    Mon May 29 09:21:27 2006 Date: Mon, 29 May 2006 01:21:27 GMT
    Mon May 29 09:21:27 2006 Server: Micro$oft-IIS/6.67
    Mon May 29 09:21:27 2006 X-Powered-By: PHP/5.1.4
    Mon May 29 09:21:27 2006 Connection: close
    Mon May 29 09:21:27 2006 Transfer-Encoding: chunked
    Mon May 29 09:21:27 2006 Content-Type: application/exe
    Mon May 29 09:21:27 2006 文件大小未知,无法多点传输.
    Mon May 29 09:21:27 2006 开始接受数据!
    Mon May 29 09:21:27 2006 关闭
    我已经发送了Mon May 29 09:21:27 2006 Content-Type: application/exe
    但是还是下载得到php
      

  3.   

    $file_type=substr( strrchr( $row['file_real_name'], "." ), 1 );
    $file_size=filesize(ROOT_PATH.'UploadFiles/'.$row['file_replace_name']);
    Header("Content-type: application/x-".$file_type);
    Header("Accept-Ranges: bytes");
    Header("Accept-Length: ".$file_size);
    header("Content-Description: PHP3 Generated Data"); Header("Content-Disposition: attachment; filename=".$row['file_real_name']);
    readfile(ROOT_PATH.'UploadFiles/'.$row['file_replace_name']);
    flush();
      

  4.   

    原来是 header("Content-Disposition: attachment; filename=".$srcfile);
    ~~~~~~~~~~~~
    谢谢拉~~~~~~~~~~~~~~~~~~