Hi,

I'm no expert, so sorry if this doesn't work (or there is an easier way).

There are some Server Variables which you can access within in-built
PHP functions to get the current page name. The function looks
something like this to display it (where "variable" is the Server
Variable):

echo $_SERVER['variable'];

For example, if you want the current page filename, use
echo $_SERVER['PHP_SELF'];

Here's a list of all the Server variables
http://ca.php.net/manual/en/reserved.variables.server.php

To reduce so that only a certain part is showing, you can try the
substr() function or another string function.

Or you could perhaps have an ifelse statement that changes a variable
based on the Server Variable. For instance

$url = $_SERVER['PHP_SELF'];

if ($url == "Folder/index.php") {
  $file = "Home";
}
...

Hope that helps,

-bryan

--- In [email protected], Tedit kap <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I am trying to automatically show the name of the page and its
directory. For example, 
> If there is a home page it would show
> Home
> For a page directly linked from the home page it would show:
> Home>Subpage1
> For a page linked from Subpage 1, 
> Home>Subpage1>Subpage1-1
> I would like this to print automatically depending on the name of
the page. Is there a way to automatically do this? Does it matter if
the subpages are in separate folders-if so how does it change (Lets
say subpage 1 and all pages under it are in a folder called subpage1)?
And is the file name or page title used in the code?
> 
> 
>       
> 
> [Non-text portions of this message have been removed]
>


Reply via email to