Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

downloaded file format

Status
Not open for further replies.

zyrag

IS-IT--Management
Dec 4, 2002
252
PH
i have pages which do the following:

on page1.php -> to compressed the files

exec("cp /home/files/* .");
exec("tar cvf - a.txt b.txt | gzip > txtfiles.tar.gz");

on page2.php -> to transfer files to my workstation

$filename = "txtfiles.tar.gz";
header("Content-Disposition: attachment; filename=$filename");
header("Content-Transfer-Encoding: binary");
header("Content-Type: application/octet-stream");
readfile ("$filename");

QUESTION:
When i download the file, the save dialog will give me the option to save the file with the format 'txtfiles[x].tar.gz, where x is a number. Why am i presented this file format and not just 'txtfiles.tar.gz' as i specified. how do i correct this problem?

thanks,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top