Good day!
I have the following code to open a pdf via sftp
and show it (inline).
Everything works fine, but at the top left is the name of the script php
(eg " miscript.php
") instead of the file name ( $srcFile
).
To download it works correctly.
<?
...
$stream = fopen("ssh2.sftp://$sftp/$ruta_destino_actual/$srcFile", 'rb');
header("Content-Type: application/pdf");
header("Content-Disposition:inline;filename=$srcFile");
fpassthru($stream);
...
?>
Any solution? Thanks!