faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

33 of 46 people (72%) answered Yes
Recently 5 of 10 people (50%) answered Yes


using the header function to redirect a script to a PDF file I am getting junk characters?

Feb 22nd, 2008 19:58
dman, Sheni R. Meledath, http://www.ttnr.org

Sorry this is not the answer. More details of the problem that occured
I am having a problem using the header() function. I am using this
function in a script that is used to download files. 
When used, I am getting a blank page with some junk characters and some
 html code, that I haven't created. But in the location its 
showing the correct url.
Function used in the script  - download.php3:
header("Location: http://www.test.com/pdf/test.pdf");
The page I got after executing the script is a blank page with the
following source code (junk characters in their respective html code).
<html><body><embed width=100% height = 100% fullscreen = yes src =
The embed src is the name of the script file. But in the location field
its showing the pdf url. This happened in IE browser. 
Please help me to solve this issue.