Reply to Re: <font size="-1">

Your name:

Reply:


Posted by Vladimir Ghetau on 06/14/07 17:56

On Jun 14, 12:36 am, "tes...@hotmail.com" <tes...@hotmail.com> wrote:
> 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 );
> $len = strlen( $buf );
> header( "Pragma: public" );
> 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>
> <td>FieldOneHeader</td>
> <td>FieldTwoHeader</td>
> <td>FieldThreeHeader</td>
> ...
> <td>FieldTenHeader</td>
> </tr>
> <?php
> //Oracle DB Connection username and password etc here
>
> $s = OCIParse($connection. "select * from theTable");
> OCIExecute($s, OCI_DEFAULT);
> while (OCIFetch($s)) {
> print '<tr><td><font size="-1">' . ociresult($s, "FIELDONENAME") .
> '</font></td>';
> print '<td><font size="-1">' . ociresult($s, "FIELDTWONAME"). '</
> font></td>';
> print '<td><font size="-1">' . ociresult($s, "FIELDTHREENAME"). '</
> font></td>';
> print '<td><font size="-1">' . ociresult($s, "FIELDFOURNAME"). '</
> font></td>';
> print '<td><font size="-1">' . ociresult($s, "FIELDFIVENAME"). '</
> font></td>';
> //rest here .......
> print '<td><font size="-1">' . ociresult($s, "FIELDNINENAME"). '</
> font></td>';
> print '<td><font size="-1">' . ociresult($s, "FIELDTENNAME"). '</
> font></td></tr>';}
>
> print '</table>';
>
> ?>
>
> The wierd part is if I only put font size in the first 5 fields it
> will work:
> print '<tr><td><font size="-1">' . ociresult($s, "FIELDONENAME") .
> '</font></td>';
> print '<td><font size="-1">' . ociresult($s, "FIELDTWONAME"). '</
> font></td>';
> print '<td><font size="-1">' . ociresult($s, "FIELDTHREENAME"). '</
> font></td>';
> print '<td><font size="-1">' . ociresult($s, "FIELDFOURNAME"). '</
> font></td>';
> print '<td><font size="-1">' . ociresult($s, "FIELDFIVENAME"). '</
> font></td>';
> //rest here .......
> print '<td>' . ociresult($s, "FIELDNINENAME"). '</td>';
> print '<td>' . ociresult($s, "FIELDTENNAME"). '</td></tr>';
>
> Please advise.




Why don't you use this:

http://sourceforge.net/projects/php-doc-xls-gen/



Sounds a lot better than trying to force things . Some people may have
no Word installed, this would suck with Doc headers for HTML.


Cheers!


Vladimir

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация