Page 1 of 1

Another Seemlingly Easy Question-

Posted: Wed Jul 28, 2004 8:52 am
by NewfieBilko
Hey guys, one more thing for today.

I want to use
($_SERVER

to find the Directory

i use
($_SERVER['PHP_SELF']);

and i get admin/frmAdmin.php

I use basename($_SERVER['PHP_SELF']);
and i get /frmAdmin.php.

How can I just get:

admin


THX

Posted: Wed Jul 28, 2004 8:57 am
by liljester
try:

Code: Select all

dirname($_SERVER[PHP_SELF]);

Posted: Wed Jul 28, 2004 8:58 am
by NewfieBilko
PS; i scoure php.net right now lookikng for reference to all the $SERVER calls, but cannot find that page... :(

Posted: Wed Jul 28, 2004 8:58 am
by NewfieBilko
ah, dirname, right on, lets see here

Posted: Wed Jul 28, 2004 9:06 am
by NewfieBilko
THX< OP please SOLVED this

Posted: Wed Jul 28, 2004 9:07 am
by Draco_03
You know that when you edit or create a reply to your own post you can put SOLVED yourself :)

Posted: Wed Jul 28, 2004 10:47 am
by NewfieBilko
Check