<?php
$command = 'pdftk 1.pdf 2.pdf 3.pdf cat output 123.pdf';
$result = shell_exec($command);
header('Content-disposition: attachment; filename=123.pdf');
header('Content-type: application/pdf');
readfile('123.pdf');
?>
http://my.oschina.net/cart/原創,轉載請註明!
我們還可以更巧妙地利用PHP SHELL結合合併所有類型大文件:
兩個rmvb合體的方法就是把兩個rmvb文件直接拼起來就行了,命令如下:
copy /b 1.rmvb /b + 2.rmvb all.rmvb
若要將文件夾下的所有rmvb文件合爲一個文件,則可以使用如下命令:
copy /b *.rmvb all.rmvb