Guest User

Untitled

a guest
Dec 10th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.65 KB | None | 0 0
  1. header("Expires: 0");  
  2. header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");  
  3. header("Cache-Control: no-store, no-cache, must-revalidate");  
  4. header("Cache-Control: post-check=0, pre-check=0", false);  
  5. header("Pragma: no-cache");  
  6. header("Content-type: application/pdf");
  7.  
  8.               pg_exec($dbh, "BEGIN");
  9.                $ofp = pg_lo_open($data[14], "r");
  10.                if      (!$ofp)
  11.                {
  12.                        echo "cannot open BLOB<br>\n";
  13.                 }
  14.                $img = pg_lo_read_all($ofp);
  15.                print $img;
  16.                 pg_lo_close($ofp);
  17.                 pg_exec($dbh, "END");
  18.         }
Add Comment
Please, Sign In to add comment