note 42772 deleted from function.readfile by tomsommer

From: Date: Mon, 09 Aug 2004 06:50:00 +0000
Subject: note 42772 deleted from function.readfile by tomsommer
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-74300@lists.php.net to get a copy of this message
Note Submitter: davi@lightcomm.com.br ---- Remember to use the @ before the readfile function: <?php @readfile("myfile.txt"); ?> instead of <?php readfile("myfile.txt"); ?> cos if you ommit the @, and you are forcing a download (with the Header "Content-Disposition: attachment"), if you get an error, the user will download the error message. I think it is better to download an empty file than to download an error message instead of the content I wanted.

« previous php.notes (#74300) next »