看板 PHP 關於我們 聯絡資訊
※ 引述《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