0
I have a system that I didn’t create, the bank runs on sybase
driver-like odbc
, the php
accesses everything with odbc
, I need to download Pdfs that are recorded in this database in the type file column long binary
.
I make the following query in the bank plus what returns and the encrypted text:
$result = odbc_exec($connect , $sql);
$conteudo = odbc_result($result, "arquivo");
header("Content-Type: application/pdf; name='teste'" );
header("Pragma: no-cache");
echo $conteudo;
I’ve done with header plus the file only returns corrupted.
You know another way I can try because I searched everywhere and I couldn’t find.