getting the name of the requested page from an included page
Posted: Mon Mar 19, 2007 12:30 am
If you have one page that includes another, is there a way for the included file to access the name of the first page when it is requested? For example:
index.php:
navigation.php:
Is there a way to make $requested_page contain the value "index.php" when navigation.php is included from index.php?
index.php:
Code: Select all
<?php include_once("navigation.php");?>
...Code: Select all
You requested page: <?php echo $requested_page?>.