I have a system I did not create, the bank runs in sybase
with driver odbc
, php
access everything with odbc
, I need to download PDFs that are stored in this database in the file column of type long binary
.
I make the following query in the bank plus what returns me 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 already done with header plus the file only returns corrupted.
You know another way you can try because I tried everything and I did not find it.