仅代参考
 $db=new DataBase;
  $re=$db->DataQuery("select * from js_trade where js_res_id='$id'");
  $ry=mssql_fetch_array($re);
  $fe=$ry["js_tra_path"];*/ 
  $word = new COM("word.application") or die("Can't start Word!");
  echo "Loading Word, v. {$word->Version}<br>";
  $word->Visible = 1;
  $word->Documents->Add();
  $word->Selection->TypeText("Testing 1-2-3...");
  echo "Check for the file...";