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?
Dsiembab
5
Junior Poster
Recommended Answers
Jump to PostHere 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 …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.