DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   RSS, Web Services and SOAP (http://www.daniweb.com/forums/forum151.html)
-   -   problem with firefox no problem with ie7 (http://www.daniweb.com/forums/thread83077.html)

Dsiembab Jul 9th, 2007 11:20 am
problem with firefox no problem with ie7
 
I have a xsl file that is saved as whatever.php. the style sheet is called by <?xml-stylesheet type="text/xsl" href="whatever.php"?>
I get an error on firefox that it does not have the correct mime type.
I save the xsl file under php because I need to use php in the code to execute certain functions. What is the correct mime type for firefox?

dezignwork Jul 15th, 2007 10:59 pm
Re: problem with firefox no problem with ie7
 
Here are a few 'possible' solutions. I haven't tested them, but they should work in my opinion.

1) Set the headers for PHP file to xml. Most browsers don't parse XML files if they have unknown extensions.

header('Content-Type: text/xml');
header('Content-Disposition: inline; filename=sample.xml');

2) Try using mod rewrite so that you call whatever.xml instead of whatever.php

Dsiembab Jul 16th, 2007 9:58 am
Re: problem with firefox no problem with ie7
 
I'll have to try that, I actually just ended up parsing it with javascript so I could make it into an ajax app. thanks


All times are GMT -4. The time now is 11:44 pm.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC