Ir para conteúdo
Fórum Script Brasil

Edu Lindenberg

Membros
  • Total de itens

    2
  • Registro em

  • Última visita

Posts postados por Edu Lindenberg

  1. Olá, estou tendo o mesmo problema...

    só consigo baixar corretamente os arquivos TXT e PDF..

    XLS, DOC, JPG, ZIP(contendo arquivos DOC, XLS) não funcionam..

    tentei de tudo, e com diversos headers diferentes..

    $file = $_GET['file']; // pega o endereço do arquivo

    header("Content-Type: application/save");

    header("Content-Length:".filesize($file));

    header('Content-Disposition: attachment; filename=\"' . basename($file) . '\"');

    header("Content-Transfer-Encoding: binary");

    header("Cache-Control: no-cache, must-revalidate");

    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");

    //header('Expires: 0');

    header('Pragma: no-cache');

    /* ORIGINALMENTE EU USAVA ISTO

    $fp = fopen("$file", "r"); //abre com atributo read-only

    fpassthru($fp);

    fclose($fp);

    */

    readfile($file);

    Alguém já achou a solucao?

×
×
  • Criar Novo...