write php code in xml file didn't work -


i tried write php code inside xml file,but code can't outputed..

<?xml version="1.0"?> <multimediagallery>     <file type="video">         <thumb>media/videos/thumbs/<?php echo "disney.png"; ?></thumb>         <source>https://www.youtube.com/watch?v=irf02lnzlpe</source>         <description>youtube video: introduction html5</description> </file> </multimediagallery>  

result(image of .xml file in browser) enter image description here

rename file .php , change code this:

<?php header("content-type: text/xml"); ?> <?xml version="1.0"?>  <file type="video">     <thumb>media/videos/thumbs/<?php echo "disney.png"; ?></thumb>     <source>https://www.youtube.com/watch?v=irf02lnzlpe</source>     <description>youtube video: introduction html5</description> </file> </multimediagallery> 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -