PHP Downloading PDF
===

What i must do for downloading pdf 


    $pdf=new PDF();
    $pdf->AddPage();
    $pdf->SetFont('Arial','',12);
    $txt="ssssiiiiiiOOOOO\n\n";
    $pdf->MultiCell(0,25,permayaps($detay),0,'J');
    $file =  $pdf->Output();
    
    header('Content-Description: File Transfer');
    header('Content-Type: application/octet-stream');
    header("Content-disposition: attachment; filename=\"".basename($filename)."\"");
    readfile("$file");  

> Result1  : <b>Notice</b>:  Undefined variable: filename  <br />
> Result2  :  <b>Warning</b>:  readfile(): Filename cannot be empty

 if i just use like this oping browser PDF not problem


    $pdf=new PDF();
    $pdf->AddPage();
    $pdf->SetFont('Arial','',12);
    $txt="ssssiiiiiiOOOOO\n\n";
    $pdf->MultiCell(0,25,permayaps($detay),0,'J');
    $file =  $pdf->Output();

But i want download coming PDF file?
