生成WORD文件,顺手贴一个 // 启动 word $word = new COM("word.application") or die("Unable to instanciate Word"); print "Loaded Word, version {$word->Version}\n";//将其置前 $word->Visible = 1;//打开一个空文档 $word->Documents->Add();//写些东西到word里面,并保存为test.doc $word->Selection->TypeText("This is a test...something to wirte in"); $word->Documents[1]->SaveAs(getcwd().'\test.doc');//关闭 word $word->Quit();//释放对象 $word->Release(); $word = null;
// 启动 word
$word = new COM("word.application") or die("Unable to instanciate Word");
print "Loaded Word, version {$word->Version}\n";//将其置前
$word->Visible = 1;//打开一个空文档
$word->Documents->Add();//写些东西到word里面,并保存为test.doc
$word->Selection->TypeText("This is a test...something to wirte in");
$word->Documents[1]->SaveAs(getcwd().'\test.doc');//关闭 word
$word->Quit();//释放对象
$word->Release();
$word = null;
2.本身就可以上传多个文件,和上传一个文件基本一样
需要注意的是http一次能上载的文件大小有限,所以一般处理的时候还是一个个上比较好
多个文件一起上,总的大小比较大了