.doc and php

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Francesco

    .doc and php

    Hi everybody,
    i hope s.o. can help me with some advice...
    i need to create a MS Word document (.doc, but a .rtf could be ok) by
    php, taking data from a mySql database.
    Can you help me?

    thank you in advance for your help

    Fra


    --
    Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
  • Kimmo Laine

    #2
    Re: .doc and php

    "Francesco" <fraven75@hotma il.comwrote in message
    news:38ecb0bb29 c7813309919b0e0 735b30f.32828@m ygate.mailgate. org...
    Hi everybody,
    i hope s.o. can help me with some advice...
    i need to create a MS Word document (.doc, but a .rtf could be ok) by
    php, taking data from a mySql database.
    Can you help me?
    >
    thank you in advance for your help

    doc is pretty damn ugly thing, try the rtf rather. It's ugly as hell too,
    but just not as horrible as doc. I've done rtf's so that first I write a
    template in Word and save to rtf, then open the rtf as plaintext and just
    add php for the magic. Doc isn't anywhere near as friendly as that.

    --
    "ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" -lpk
    spam@outolempi. net | Gedoon-S @ IRCnet | rot13(xvzzb@bhg byrzcv.arg)


    Comment

    • Francesco

      #3
      Re: .doc and php

      thx, good idea...i'll try to do so
      Fra


      --
      Posted via Mailgate.ORG Server - http://www.Mailgate.ORG

      Comment

      • Kimmo Laine

        #4
        Re: .doc and php

        "Francesco" <fraven75@hotma il.comwrote in message
        news:3919280d36 123dcec40aeceb8 d2b8403.32828@m ygate.mailgate. org...
        thx, good idea...i'll try to do so
        Fra
        >

        If you do decide to use rtf, here's some magical lines that you may find
        very useful, took me forever to get these right ;)

        header('Content-type: application/msword');
        header('Content-Disposition: attachment; filename="myfil e.rtf"');
        header('Cache-Control: private');

        --
        "ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" -lpk
        spam@outolempi. net | Gedoon-S @ IRCnet | rot13(xvzzb@bhg byrzcv.arg)


        Comment

        • Francesco

          #5
          Re: .doc and php

          if someone else is intrested i found a free class you can use to create
          ..doc files, without using COM.
          you can find it here (download require free reg):



          thank you again
          fra


          --
          Posted via Mailgate.ORG Server - http://www.Mailgate.ORG

          Comment

          Working...