| @@ 997-1009 (lines=13) @@ | ||
| 994 | $name = 'doc.pdf'; |
|
| 995 | switch(strtoupper($dest)) |
|
| 996 | {
|
|
| 997 | case 'I': |
|
| 998 | // Send to standard output |
|
| 999 | $this->_checkoutput(); |
|
| 1000 | if(PHP_SAPI!='cli') |
|
| 1001 | {
|
|
| 1002 | // We send to a browser |
|
| 1003 | header('Content-Type: application/pdf');
|
|
| 1004 | header('Content-Disposition: inline; '.$this->_httpencode('filename',$name,$isUTF8));
|
|
| 1005 | header('Cache-Control: private, max-age=0, must-revalidate');
|
|
| 1006 | header('Pragma: public');
|
|
| 1007 | } |
|
| 1008 | echo $this->buffer; |
|
| 1009 | break; |
|
| 1010 | case 'D': |
|
| 1011 | // Download file |
|
| 1012 | $this->_checkoutput(); |
|
| @@ 1010-1018 (lines=9) @@ | ||
| 1007 | } |
|
| 1008 | echo $this->buffer; |
|
| 1009 | break; |
|
| 1010 | case 'D': |
|
| 1011 | // Download file |
|
| 1012 | $this->_checkoutput(); |
|
| 1013 | header('Content-Type: application/x-download');
|
|
| 1014 | header('Content-Disposition: attachment; '.$this->_httpencode('filename',$name,$isUTF8));
|
|
| 1015 | header('Cache-Control: private, max-age=0, must-revalidate');
|
|
| 1016 | header('Pragma: public');
|
|
| 1017 | echo $this->buffer; |
|
| 1018 | break; |
|
| 1019 | case 'F': |
|
| 1020 | // Save to local file |
|
| 1021 | if(!file_put_contents($name,$this->buffer)) |
|