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,
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,