PHP Classes

format non readable

Recommend this page to a friend!

      Handle Binary Files With PDO  >  All threads  >  format non readable  >  (Un) Subscribe thread alerts  
Subject:format non readable
Summary:error with pdf files
Author:Juan F. Gutierrez M.
Date:2018-06-01 02:07:13

  1. format non readable   Reply   Report abuse  
Picture of Juan F. Gutierrez M. Juan F. Gutierrez M. - 2018-06-01 02:07:13
Hello. I don┤t now what happenn.

The file is recorded in database. but I get message "format non readable". and the file not showed.

what can i do?


Juan Gutierrez

  2. Re: format non readable   Reply   Report abuse  
Picture of zinsou A.A.E.Mo´se zinsou A.A.E.Mo´se - 2018-06-01 05:36:58 - In reply to message 1 from Juan F. Gutierrez M.

This is actually not an issue. It is just a message to let the user who is testing the package with the example file, know that i don't handle this case on this page.But this don't prevent you to use the package with PDF files as you may see. The Package has saved as expected the file in the Database so from there, nothing prevent to serve it in the browser. I will show a simple way to serve it in the browser.

Get back to the testHBFWPDO.php file and go to the line 45 .You error message is there

echo 'format non readable';

you can change it by anything you want .

for example

replace only

echo 'format non readable';


BFile_WithPDO::get($bdd,$_FILES[ 'file' ]['name'],'header(\'Content-Disposition: attachment; filename="downloaded.pdf"\')');

and test it again with your pdf file.

Let me know if you understand now or if you need more help.

For more information send a message to info at phpclasses dot org.