Hi, I require a little help creating dynamic includes via reference. Please let me explain what I am trying to do.
I created a PHP script called REF.PHP which processes information passed to it via ?id=someid. I have given each webpage, image and CSS file its own ID which looks something like 0509011224. So it would work something like;
http://www.webserver/ref.asp?id=0509011224
Using this feature I can create HYPERLINKS, include IMAGES and CSS files by the method above. What I am trouble with is including webpages through PHP includes using this feature.
The traditional method is
<?PHP INCLUDE 'webpage.php' ?>
What I want to do is include webpage.php by its ID.
Ie.
<?PHP INCLUDE 'ref.php?0509011224' ?>
That method didn't work though, and only provided an invalid stream error. Is there some method of retrieving the webpage to include from another webpage using this method?
If it helps, here is the current code within my ref.php file.
<?PHP
$id=$_GET['id'];
if ($id=="about") {
echo "REF.PHP - Copyright (c) 2005 by Paul Moffat";}
elseif ($id=="il2") {
header("Location: http://www.il2sturmovik.com/");}
elseif ($id=="0508271939") header("Location: /zkdcc/inc/header.php");
elseif ($id=="0508272001") header("Location: /zkdcc/main.css");
elseif ($id=="0508272150") header("Location: /zkdcc/image/title.jpg");
elseif ($id=="0508262053") header("Location: /zkdcc/index.php");
?>
I am hoping that there is someway that this REF.PHP webpage can somehow process the ID given to it and provide the calling webpage with the associated webpage address.
I know this isn't possible within ASP but was hoping PHP was capable of doing so.
Any help would greatly be appreciated.
Regards, ZK-DABLIN