•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 402,035 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,426 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 491 | Replies: 2 | Solved
![]() |
Hello,
I was wondering if someone could point me in the right direction.
Is their anyway in php that I can change the outlook of an xsl file and include variables from my php script. I have an xsl file, I changed the file extension to php and it worked great in IE but gave me an error in firefox. so I changed it back to xsl. But now the php code will not work because of the file extension.
I was wondering if someone could point me in the right direction.
Is their anyway in php that I can change the outlook of an xsl file and include variables from my php script. I have an xsl file, I changed the file extension to php and it worked great in IE but gave me an error in firefox. so I changed it back to xsl. But now the php code will not work because of the file extension.
current personal projects The H8ers Club && PCLinuxOS non-official One stop forum
Have you included the MIME type header to the .php file so that its treated as xsl?
If not, in your .php file put:
[php]header('Content-Type: text/xml');[/php]
see: http://www.dpawson.co.uk/xsl/sect2/mimetypes.html
for others.
make sure you place the header() call before any output is made, or else see ob_start() in the php.net manual. http://php.net/ob_start/
If you would rather use an xsl extension you can use mod_rewrite in apache to have the .xsl resource handled by your .php file.
If not, in your .php file put:
[php]header('Content-Type: text/xml');[/php]
see: http://www.dpawson.co.uk/xsl/sect2/mimetypes.html
for others.
make sure you place the header() call before any output is made, or else see ob_start() in the php.net manual. http://php.net/ob_start/
If you would rather use an xsl extension you can use mod_rewrite in apache to have the .xsl resource handled by your .php file.
www.fijiwebdesign.com - web design and development and fun
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
you know I am pretty new to php and I've been looking in the wrong places all day, Maybe it's the coffee and the cigarettes rotting my brain. thanks apprecaiate it. Dave
current personal projects The H8ers Club && PCLinuxOS non-official One stop forum
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- learning php (PHP)
- PHP and XML (PHP)
- Searching XML documents with PHP (PHP)
- Help -regarding Loading Labels In Html From Xml Using Javascript Or Php (JavaScript / DHTML / AJAX)
- interact between php and flash using xml (PHP)
- Need some help with parsing an XML file (PHP)
- Dealing With XML in Visual C++ (C++)
- Php parser error when xml version is mentioned (PHP)
Other Threads in the PHP Forum
- Previous Thread: How to get HTML from URL
- Next Thread: A multi language string


Linear Mode