}I'm trying to write a script that generates XML dynamically and is
}viewable in a browser (IE). Even though I send a header saying
}"Content-type: text/xml\n", PHP still puts in a Content-type of
}text/html before that. How can I write the script so that this doesn't
}happen?
}
}Here's the script:
}
}<?php
}
}header("Content-type: text/xml\n");
}
First, ditch the \n in the above header... PHP will add the newline
for you.. =)
Second, make sure that the <?php is the very first thing in your
file. There should not be any spaces, newlines or any other
characters before the <?php ... the < character should be the first
character in the file.. =)
--
Jeff Carnahan - [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]