I have made a custom script for a site that uses etomite. And part of that I need some php above the doctype in the main template. I have enabled the "Allow Embedded PHP" setting for me to do this. However, the php code, even though it works, it appears in the source code.
Only it doesnt appear on the index.php?id=20 page.
This maybe a misunderstanding of PHP on my part as I've not come across this problem before, and this snippet of PHP i took off the internet as I wasnt sure on how to grab the page name.
But I've posted it here now as it appeared when i switched the allow emebbed php setting on.
Heres the php code that appears:
<?php
$url = "http://".$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'];
if (!empty($_SERVER["QUERY_STRING"]))
$url .= "?".$_SERVER['QUERY_STRING'];
if ($url== "http://www.example.co.uk/index.php?id=20") {
include('somefile.php');
}
else {
}
?>
Any suggestions would be appreciated.










