I am storing .docx files in a mysql database as largeblobs, in separate chunks (so as not to overflow each blob). Then in a php, I display the document after "gluing" together the chunks from the database. Everything looks great except that the document appears not to have page breaks, which is a problem when trying to export it into other programs. Anyone know how to get the page breaks in there or where I went wrong?
<?
$username=xxx;
$password=xxx;
$database=xxx;
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die("Unable to select database");
$doc=$_GET['doc'];
header('Content-type: application/vnd.openxmlformats-officedocument.wordprocessingml.document');
$request = mysql_query("SELECT docData FROM tblDoc WHERE doc='$doc' ORDER BY pieceOrder ASC");
while($row=mysql_fetch_array($request)) {
echo $row['docData'];
}
mysql_close();
?>