Reading/Writing a MS Word file in PHP

前端 未结 16 1753
借酒劲吻你
借酒劲吻你 2020-11-22 14:35

Is it possible to read and write Word (2003 and 2007) files in PHP without using a COM object? I know that I can:

$file = fopen(\'c:\\file.doc\', \'w+\');
fw         


        
16条回答
  •  北荒
    北荒 (楼主)
    2020-11-22 14:38

    2007 might be a bit complicated as well.

    The .docx format is a zip file that contains a few folders with other files in them for formatting and other stuff.

    Rename a .docx file to .zip and you'll see what I mean.

    So if you can work within zip files in PHP, you should be on the right path.

提交回复
热议问题