How do I include PHP codes in an XML file?
I have a FLASH Gallery that i want to alter the names of the photo's
but i can't do that because i don't know how to include the PHP in the XML file ,, can you help me ?
How do I include PHP codes in an XML file?
Started by Nokia N93, Dec 02 2010 03:11 PM
3 replies to this topic
#1
Posted 02 December 2010 - 03:11 PM
|
|
|
#2
Posted 02 December 2010 - 03:16 PM
You can tell Apache to parse XML files for PHP code by creating a file named .htaccess (note it has a period at the beginning) within the same folder as your script, and adding the following contents:
AddType application/x-httpd-php .xmlYou can then freely use <?php ?> tags within your xml file and it will be generated automatically each time.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#3
Posted 03 December 2010 - 02:45 AM
Nullw0rm said:
You can tell Apache to parse XML files for PHP code by creating a file named .htaccess (note it has a period at the beginning) within the same folder as your script, and adding the following contents:
AddType application/x-httpd-php .xmlYou can then freely use <?php ?> tags within your xml file and it will be generated automatically each time.
thanx Nullw0rm ,,, i'm not professional at PHP nor XML
but i searched for something called SimpleXML
is it possible to use it in this case,, if u have ever tried it ?
#4
Posted 05 December 2010 - 05:21 PM
SimpleXML is a class to work with XML documents within PHP, I am not sure if that is what you're looking for.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.


Sign In
Create Account

Back to top









