var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
PHP: Creating a .doc
How do I put text into a .doc and then write it to the server?
.doc as in a plain textfile, or .doc as in a wordfile?
You will likely be better off creating a .RTF file which can be read easily by Word. MS Word is not a simple file format.
Windows & Linux hosting and fully managed dedicated servers with great customer service!
UK-based but serving the world...
there is an article over on phpbuilder dot com
that talks about how to create word documents on the fly
www dot phpbuilder dot com/columns/yunus20031124.php3
$word =new COM ( "Word.Application" ) or die( "Cannot start word for you" );
echo "Using word version ( $word -> Version )" ;
$word -> visible = 1 ;
$word -> Documents -> Add ();
$word -> Selection -> Typetext ( "Writing Text ...." );
$word -> Documents [ 1 ]-> SaveAs ( "c:test.doc" );
$word -> Quit ();
Thanks for the link, dgeorge.
I have decided to do it in RTF format, how do I do this?
Using PHP for RTF
www dot phpbuilder dot com/columns/nair20020523.php3?page=1
Free RTF Class
www dot smartsystems dot ro/rtfgen_be.html
If your server is windows based, just use COM calls.
You can create RTF manually, but many possibilities are not allowed. One of the solutions - use word html document with word doctype (word can create the one if you save as web-page)
Try google or msn for more information