Getting a page name from the server (PHP Newbie)
Posted: Fri Feb 24, 2006 11:15 am
Hi,
I have the following code:
pagename returns /foldername/index.php
How can I split this up so I only get index.php
THANKS!!!
I have the following code:
Code: Select all
<? $pagename = $_SERVER['PHP_SELF'] ;
if ($pagename == "index.php") {
$myimage = "image1.jpg" ;
} else {
$myimage = "image2.jpg" ;
}
?>How can I split this up so I only get index.php
THANKS!!!