On Tue, 2002-02-12 at 13:32, Erik Price wrote:
>
> On Tuesday, February 12, 2002, at 04:26 PM, Lars Torben Wilson wrote:
>
> > echo basename($_SERVER['PHP_SELF']);
> >
> > http://www.php.net/basename
> >
>
> Thank you Torben. Reading through the annotations on this manual entry,
> it looks
On Tuesday, February 12, 2002, at 04:26 PM, Lars Torben Wilson wrote:
> echo basename($_SERVER['PHP_SELF']);
>
> http://www.php.net/basename
>
Thank you Torben. Reading through the annotations on this manual entry,
it looks like I'd be safer using the home-built function after all!
Well,
On Tue, 2002-02-12 at 13:16, Erik Price wrote:
> Is there already a built-in function that gets the basename of the
> current file?
>
> I wrote this:
>
> function get_current_page_name()
> {
> $current_page_name = explode("/", $_SERVER['PHP_SELF']);
> $current_page_name = array_slice($c
Is there already a built-in function that gets the basename of the
current file?
I wrote this:
function get_current_page_name()
{
$current_page_name = explode("/", $_SERVER['PHP_SELF']);
$current_page_name = array_slice($current_page_name, -1);
return $current_page_name;
}
but I'm
4 matches
Mail list logo