我见过his系统,他们做的病历就是在word中进行编辑的,但怎么实现的就不知道了!!谁有这方面的资料吗!!

解决方案 »

  1.   

    通常情况下会有二种处理方式:
    一种处理方式为:使用PHP访问COM的方式$word = new COM("word.application"); 
    生成word对象后采用调用com的方法来处理想要的方法。
        <?php
        $word = new COM("word.application");
        //To see the version of Microsoft Word, just use $word->Version
        echo "I'm using MS Word {$word->Version}";
        //It's better to keep Word invisible
        $word->Visible = 0;
        //Creating new document
        $word->Documents->Add();
        //Setting 2 inches margin on the both sides
        $word->Selection->PageSetup->LeftMargin = '2"';
        $word->Selection->PageSetup->RightMargin = '2"';
        //Setup the font
        $word->Selection->Font->Name = 'Verdana';
        $word->Selection->Font->Size = 8;
        //Write some text
        $word->Selection->TypeText("Hello, universe!");
        //Save the document as DOC file
        $word->Documents[1]->SaveAs("C:\\apachefriends\\xampp\\htdocs\\com\\a.doc");    //And of course, quit Word
        $word->quit();
        $word->Release();
        $word = null;
        //Give the user a download link
        echo '<a href="a.doc">Download file as .doc</a>';
        ?> 
    另一种处理方式:从网上找些强人写的纯PHP处理代码,如:PEAR的OpenDecument
    以上想采取什么方式自己找好了。
      

  2.   

    用COM可以的,但效率很低的,别的方式没有用过