问一下各位大侠
  我用http://..... 访问一个程序的时候,这个程序能正常解析,并实现下载CSV文件的功能.
  为什么,用https://..... 访问同一个程序的时候,好象不能正常解析该程序,因为没有实现下载CSV文件,
而把原代码的***.PHP文件下载了?

解决方案 »

  1.   

    给你个方法试试//文件下载函数
    //$content  内容
    //$dest     文件名
    function down_file($content,$dest){
    header("Pragma: public");
    header("Expires: 0");
    header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
    header("Content-Type: application/octet-stream");
    //header("Content-Type:text/html;charset=gb2312"); 
    header("Content-Disposition: attachment; filename=$dest" );
    header("Content-Transfer-Encoding: binary");
    //header("Content-Length: ".count($content));
    echo '<head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>';
    echo $content;
        die();
    }