0

I'm working on a server that is using PHP 4.4.9(doesn't use PHP 5 and I can't upgrade) I need to write a action that will take an existing PHP page and convert it to a similar looking word document.

How can I do such a thing?

Deduplicator
  • 44,692
  • 7
  • 66
  • 118
The GiG
  • 2,571
  • 2
  • 28
  • 29
  • 2
    Not easily, and definitely not easily in PHP4. – ceejayoz Oct 19 '11 at 14:38
  • 2
    possible duplicate of [CSS 2.1 compliant HTML to Microsoft Word conversion?](http://stackoverflow.com/questions/471262/css-2-1-compliant-html-to-microsoft-word-conversion) - see openoffice/libroffice headless conversion via exec – mario Oct 19 '11 at 14:44

1 Answers1

0

Update

Apparently the only surefire way to convert HTML to DOC under PHP4 would be to use an external tool and call it through exec:


One option would be to grab HTML output and feed it to a PDF converter. It isn't exactly a Word document but just might do the trick.

For PHP4:

Community
  • 1
  • 1
Saul
  • 17,973
  • 8
  • 64
  • 88
  • 2
    You really should switch to a host that has PHP5. PHP4 hasn't been supported for three years now - no security fixes. – ceejayoz Oct 19 '11 at 14:46