Posted by Michael Fesser on 06/14/07 00:14
..oO(teser3@hotmail.com)
>I can put out a Word Doc from PHP but if I try and manipulate the font
>size in the PHP part it outputs a blank Word Document.
>
>Here is what I have:
><?php
> $fname="report.doc";
> $handle = fopen( $fname, "rb" );
> $buf = fread( $handle, filesize( $fname ));
> fclose( $handle );
file_get_contents() exists.
> $len = strlen( $buf );
> header( "Pragma: public" );
'Pragma' is a request header, usage in a response is not defined.
Additionally the only defined directive for this header is 'no-cache'.
> header( "Cache-Control: private" );
> header( "Connection: close" );
> header( "Content-Type: application/msword" );
> header( "Content-Length: $len" );
> header( "Content-Disposition: inline; filename=\"$fname\"" );
> print $buf;
>>
><table border="1">
><tr>
>[...]
Now I'm confused - do you want to output the .doc document _and_ the
following together on the same page? That's not going to work.
Micha
Navigation:
[Reply to this message]
|