PHP not parsing XML file

beelmoondooynn

New Member
My original issues solved: Read page URL in XML? Or use PHP within an XML file, have lead to a new one.I have a flash element in a webpage, whose .swf calls upon a settings.xml file for certain values.One of the values must be url dependant - it needs to show the value (0-2) that is the second-last character of URL (before trailing /).So I have a PHP function, \[code\]curPageURL()\[/code\], which grabs the URL, and slices out the correct character, this is tested working.The line in XML reads:\[code\]value="http://stackoverflow.com/questions/11145492/<?php echo substr( curPageURL(), -2, 1); ?>"\[/code\]And .htaccess contains:\[code\]AddHandler application/x-httpd-php5s .phpAddHandler x-httpd-php5 .xml\[/code\]Yet, when I view the source at /settings.xml, the line reads off \[code\]<?php\[/code\] unaltered, and the flash doesn't display. If I substitute the PHP for the value which it does evaluate too, it works fine. So for some reason it isn't parsing.Thanks in advance,
 
Back
Top