Page 1 of 1

global variables..

Posted: Mon Jan 02, 2006 2:49 am
by IAD
Hey,

i wanted to know if there's a way to get only the page's name without the folder name [index.php] and not [forum/index.php]..

Thanks, Tal.

Posted: Mon Jan 02, 2006 3:26 am
by mickd
this function might do you well. basename

Posted: Mon Jan 02, 2006 11:04 pm
by djot
-
The current scriptname is found in this global variable:

Code: Select all

$_SERVER["SCRIPT_NAME"]
djot
-

Posted: Tue Jan 03, 2006 12:12 am
by John Cartwright
fyi it never hurts to have a look in

Code: Select all

echo '<pre>';
print_r($_SERVER);
echo '</pre>';
to give you an idea of what's needed

Posted: Tue Jan 03, 2006 12:15 am
by djot
-
@jcart

or use phpinfo()

? || :)


djot
-