Page 1 of 1

Package with file loading from database.

Posted: Wed Apr 13, 2005 10:55 pm
by njwan
I would like to package some files to download this, but all files are content in Database, How can I get it to package?
Ex:
I save file name: test.doc, test.xsl in mysql Database by DataBloc
And now I want to get all files and package to package1.tar (content test.doc and test.xsl) to download it.

How can I package? Help me please.
Thanks!

Posted: Wed Apr 13, 2005 11:55 pm
by Bennettman
header() has a lot of content on doing this.

The basic idea is that you set headers to tell the browser the type of file it is, and then load the package content in from the database.

Package with file loading from database.

Posted: Thu Apr 14, 2005 1:45 am
by njwan
I would like to package some files to download this, but all files are content in Database, How can I get it to package?
Ex:
I save file name: test.doc, test.xsl in mysql Database by DataBloc
And now I want to get all files and package to package1.tar (content test.doc and test.xsl) to download it.

How can I package? Help me please.
Thanks!

The Header() is support to download, I want add to package before download!

Posted: Thu Apr 14, 2005 2:17 am
by n00b Saibot
If you want to genetrate them on the fly then first read the files from database and write them to files with same names. Then use exec to tar them into a package an dthen send this on its way. pretty simple.;)