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!

how to: change the filename at the 'File Download' dialog

Status
Not open for further replies.

zyrag

IS-IT--Management
Dec 4, 2002
252
PH
in the File Download common dialog, what appear is the ff lines:

"You are downloading the file:
mypage.php from myserver.com"

where mypage.php is my php download page.

How do i change it so that mypage.php will be replaced by the filename of the file to be downloaded?

Below is the download script:
<?
$filename = basename($archive_dir . $myfiles.tar.gz&quot;);
header(&quot;Content-Disposition: attachment; filename=$filename&quot;);
header(&quot;Content-Transfer-Encoding: binary&quot;);
header(&quot;Content-Type: application/octet-stream&quot;);
readfile (&quot;$archive_dir/$filename&quot;);
?>

thanks,
 

header(&quot;Content-Disposition: attachment;filename=&quot;.$filename ); ______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
karver, i tried your suggestion but i still got the same result - it's still the page name and not the filename.

any further suggestion?

thanks,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top