作者ntouckcm (知足常乐)
看板PHP
标题Re: [请益] 压缩档
时间Mon Jan 28 15:24:58 2008
※ 引述《ntouckcm (知足常乐)》之铭言:
: 请问一下
: 我要把档案打包变成压缩档下载
: $file = "D:\\www\\"; //档案路径
: system("tar -zpcf hw1.tgz view_car.c view.c",$output);
: //把view_car.c view.c变成压缩档
: if(!$output=false){
: header('Content-Description: File Transfer');
: header("Content-Type: application/force-download");
: header("Content-Disposition: attachment; filename=hw1.tgz");
: readfile($file);
: }
: 是可以下载但是压缩档里是空的,没有档案。
: 请问有人知道为什麽会这样吗?
tar指令是不是Linux系统下才能执行的指令呢?
window xp系统下 此指令可以work吗?
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 218.160.70.161