Problems with headers and downloading file

From: Date: Mon, 29 Nov 2004 17:19:47 +0000
Subject: Problems with headers and downloading file
Groups: php.general 
Request: Send a blank email to php-general+get-203069@lists.php.net to get a copy of this message
Hello. I have a problem with downloads with the use of header() I have this code at the start at the download site: Header("Content-Type: application/download"); Header("Content-Disposition: attachment; filename=export.txt"); My problem is that the file which is downloaded contains HTML code which I don't need, and don't want to have there. Is there some way to take control on what should be written to the file? I am almost there, I have all the data I want do generate on the file, but in the start of the file HTML code are written. Anyone who can help me? I can't store a file on the server, and then download it, because of some government rules. Regards Christian Johansson

« previous php.general (#203069) next »