On Tue, 25 Mar 2003, Eric Estabrooks wrote:
> In PHP I am streaming records out of my database into swish-e. 1 record
> works fine but as soon as I try 2 I get the following error:
>
> b4a748943bd4b0ddbb629169c771eddf:131: error: Extra content at the end of the
> doc
> ument
> Path-Name: 82c3453c9c33ebf2df361159391bb126
> ^
>
>
> b4a748943bd4b0ddbb629169c771eddf is the name of the first doc.
> 82c3453c9c33ebf2df361159391bb126 is the second doc.
>
> The code goes something like this:
> while($row = mysql_fetch_assoc ( $all )){
> $theDoc = gzuncompress($row['doc']);
> echo("Path-Name: " . $row['docID'] . "\n");
> echo("Content-Length: " . strlen( $theDoc ). "\n");
> echo("\n");
> echo($theDoc);
> echo("\n");
> }
You are passing the Content-Length as strlen( $theDoc ), but then you are
printing an extra \n at the end.
Does something like this work?
while($row = mysql_fetch_assoc ( $all )){
$theDoc = gzuncompress($row['doc']);
echo("Path-Name: " . $row['docID'] . "\n");
echo("Content-Length: " . strlen( $theDoc). "\n\n");
echo($theDoc);
--
Bill Moseley moseley@hank.org
Received on Wed Mar 26 16:12:18 2003