How can I add a Word document to another Word document with PHP (fwrite)?
$filename = "./1.doc";
$handle = fopen($filename, "r");
$contents = fread($handle, filesize($filename));
$filename2 = "./2.doc";
$handle2 = fopen($filename2, "r");
$contents2 = fread($handle2, filesize($filename2));
$contents3 =$contents2.$contents;
$fp = fopen("./3.doc", 'w+');
fwrite($fp, $contents);
3.doc only contains 1.doc.