I have a flash element (I know, but please don't) with a settings.xml file.
One of the values in the XML file depends on the URL, so rather than having multiple instances of the flash folder, I want to do the following:
value="<?php $rest = substr(<?php echo curPageURL(); ?>, -2, -1) ?>"
I tried that in vain, but as you probably already knew, that won't work.
So I either need a way to write that in XML, or to allow that line of PHP within the XML file.
function curPageURL() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {
$pageURL. = "s";
}
$pageURL. = "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL. = $ _SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL. = $ _SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}