note 42530 deleted from function.readfile by aidan

From: Date: Fri, 24 Sep 2004 01:26:18 +0000
Subject: note 42530 deleted from function.readfile by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-77276@lists.php.net to get a copy of this message
Note Submitter: pablo at compuar dot com ---- When making a file-download script, you might want to let the user know how much time left there is. That is accomplished with the "Content-Length" header. $size= filesize("$filename"); header("Content-Length: ".$size.); In some rare ocations the file will take long times to download using this statement.So I´ve added the "bytes" part, and it works perfectly now (the problem is that i dont know if this will be for or against the protocol specs.. Like this: header("Content-Length: ".$size. "bytes");

« previous php.notes (#77276) next »