Witam.
Wygenerowałem PDFa dzieki bibliotece FPDF i chcialbym go oprocz wyswietlenia zapisac na serwerze, jak to zrobic?
Pozdrawiam, Lukasz.
<?php $pdf->Output() ?>
<?php function Output($name='',$dest='') { //Output PDF to some destination //Finish document if necessary if($this->state<3) $this->Close(); //Normalize parameters $dest=$dest ? 'D' : 'F'; if($dest=='') { if($name=='') { $name='doc.pdf'; $dest='I'; } else $dest='F'; } switch($dest) { case 'I': //Send to standard output $this->Error('Some data has already been output, can't send PDF file'); if(php_sapi_name()!='cli') { //We send to a browser $this->Error('Some data has already been output to browser, can't send PDF file'); } break; case 'D': //Download file $this->Error('Some data has already been output, can't send PDF file'); else $this->Error('Some data has already been output to browser, can't send PDF file'); break; case 'F': //Save to local file if(!$f) $this->Error('Unable to create output file: '.$name); break; case 'S': //Return as a string return $this->buffer; default: $this->Error('Incorrect output destination: '.$dest); } return ''; } ?>