note 58130 deleted from function.header by jome

From: Date: Tue, 25 Oct 2005 10:32:42 +0000
Subject: note 58130 deleted from function.header by jome
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-97563@lists.php.net to get a copy of this message
Note Submitter: kpetecki youknowwhatkindofsign o2.pl Reason: non-english ---- Why you can not write code in this way: $pathtofile = "path to file in your server"; header("Content-Disposition: attachment; filename=\"$someFileName\""); header("Content-type: application/octet-stream"); $src = @fread(fopen($pathtofile,"rb"),filesize($pathtofile)); echo $src; and that is all. Now, the browsers ask you, if save or open $somefile.

« previous php.notes (#97563) next »