Alan Milnes wrote:
Why is the content-type not sent? What errors or warnings does PHP
display? What content-type _is_ sent? What problems does Firefox have?

Some possible reasons for this script not to work: - headers are already sent out by PHP; - one ore more conditions are too narrow or wide (especially if regular expressions are used, as in the above example); - your application conflicts with the output buffering in the script.

Thanks for your feedback. I put it into a test site to try it out - I've actually tried a lot of these scripts but not gotten any of them to work satisfactorily yet!

My pleasure! I know it's sometimes frustrating when a script doesn't work the way you would dexpect it to, but also that it is very satisfying when you get it to work and see the results. :-)


I have now gone back and spotted a mistake that I made and it now seems
to be working fine!

That's good news!

For some additional info: I usually perform three tests to make sure these content-type things work properly:

- Firefox infopanel should show 'application/xhtml+xml';
- IE/Win shouldn't pop a 'save as' dialog but show the site
  (the dialog is the sign you're serving application/xhtml+xml to IE);
- the following testpage of a friend of mine shows 'text/html':
  [http://sandbox.bednarz.nl/http/get.html?host=www.google.com&uri=/]

(Just to be concise: fill in the host and uri of the page to check instead of the 'www.google.com' and '/'.)

Good luck,

Jeroen

--
vizi fotografie & grafisch ontwerp - http://www.vizi.nl/

******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************



Reply via email to