Embeding PHP code in XML??

Discussion in 'PHP' started by ausgezeichnete, Jan 27, 2008.

  1. #1
    I have a XML file contains images
    [HIGHLIGHT="XML"]
    <content width="368" height="450" bgcolor="cccccc" loadercolor="ffffff" panelcolor="5d5d61" buttoncolor="5d5d61" textcolor="ffffff">
    <page src="pages/01.jpg"/>
    <page src="pages/02.swf"/>
    <page src="pages/03.swf"/>
    <page src="pages/04.jpg"/>
    <page src="pages/05.jpg"/>
    <page src="pages/06.jpg"/>
    <page src="pages/07.swf"/>
    <page src="pages/08.jpg"/>
    <page src="pages/09.swf"/>
    <page src="pages/10.jpg"/>
    <page src="pages/11.swf"/>
    <page src="pages/12.jpg"/>
    <page src="pages/13.jpg"/>
    <page src="pages/14.jpg"/>

    </content>



    My problem that i want to insert php code in the file.XML
    but it never read it

    am trying to edit a Flash page Flip and images comes from this xml fil
    what can i do??
     
    ausgezeichnete, Jan 27, 2008 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    Replied to you on Programmingtalk.
     
    nico_swd, Jan 27, 2008 IP
  3. ausgezeichnete

    ausgezeichnete Peon

    Messages:
    54
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    it still doesnt work!!!
    well,let me explain to u the case
    am using a bookflip application downloaded from the net
    http://www.flashpageflip.com/
    its is a html pages contains flash which gets its images from the xml file
    and the above r the code in the XML file

    my problem now,that i wan this images to be dynamically from the database
    using PHP
    so,am trying to find the way to embed the php into the XML file
     
    ausgezeichnete, Jan 28, 2008 IP
  4. bobb1589

    bobb1589 Peon

    Messages:
    289
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #4
    then use php to generate the xml file that the script will be using
     
    bobb1589, Jan 28, 2008 IP
  5. Kaizoku

    Kaizoku Well-Known Member

    Messages:
    1,261
    Likes Received:
    20
    Best Answers:
    1
    Trophy Points:
    105
    #5
    Make its file.php then use mod_rewrite to file.xml if you do not have root access.

    If you have root access then modify your httpd/apache/apache2 httpd.conf
    
    AddHandler php5-script .xml
    
    Code (markup):
    Or if you use php4
    
    AddHandler php4-script .xml
    
    Code (markup):
     
    Kaizoku, Jan 28, 2008 IP