using __FILE__ – PHP

  php

Q(Question):

Hi everyone,

I want to create a script that will determine where in an array or
database to find information based on the name of the file. I have
the reference working, but it’s giving me too much information.

<?
$f = __FILE__;
print $f
?>

gives me

/home/calador/public_html/wapolitics/counties/adams.php

All I want is "adams".

Any ideas?

Chad Lupkes
ch********@earthlink.net

A(Answer):

On 22 Nov 2003 16:21:04 -0800, Chad Lupkes wrote:

Hi everyone,

I want to create a script that will determine where in an array or
database to find information based on the name of the file. I have
the reference working, but it’s giving me too much information.

<?
$f = __FILE__;
print $f
?>

gives me

/home/calador/public_html/wapolitics/counties/adams.php

All I want is "adams".

Any ideas?

Chad Lupkes
ch********@earthlink.net

All your basename() are quite helpful in this instance…

For more information:
http://us4.php.net/manual/en/function.basename.php


— Rudy Fleminger
sp@mmers.and.evil.ones.will.bow-down-to.us
(put "Hey!" in the Subject line for priority processing!)
http://www.pixelsaredead.com

A(Answer):

I noticed that Message-ID: <np******************************@40tude.net>
from FLEB contained the following:

All your basename() are quite helpful in this instance…

All your basename() are belong to us…

Geoff Berrow (put thecat out to email)
It’s only Usenet, no one dies.
My opinions, not the committee’s, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/

A(Answer):

Hi Rudy,

I found that, and it helped. I just posted another question about arrays as
a follow up.

Thanks!


Chad Lupkes
ch********@yahoo.com
http://www.seattlewebcrafters.com/
"FLEB" <so*********@mmers.and.evil.ones.will.bow-down-to.us> wrote in
message news:np******************************@40tude.net.. .

On 22 Nov 2003 16:21:04 -0800, Chad Lupkes wrote:

Hi everyone,

I want to create a script that will determine where in an array or
database to find information based on the name of the file. I have
the reference working, but it’s giving me too much information.

<?
$f = __FILE__;
print $f
?>

gives me

/home/calador/public_html/wapolitics/counties/adams.php

All I want is "adams".

Any ideas?

Chad Lupkes
ch********@earthlink.net

All your basename() are quite helpful in this instance…

For more information:
http://us4.php.net/manual/en/function.basename.php


— Rudy Fleminger
sp@mmers.and.evil.ones.will.bow-down-to.us
(put "Hey!" in the Subject line for priority processing!)
http://www.pixelsaredead.com


Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.543 / Virus Database: 337 – Release Date: 11/21/2003

A(Answer):

> All your basename() are belong to us…

HAH. I was thinking the same thing! 🙂

A(Answer):

Regarding this well-known quote, often attributed to timmeh’s famous "Sun,
23 Nov 2003 06:01:47 GMT" speech:

All your basename() are belong to us…

HAH. I was thinking the same thing! 🙂

Um… that was the pun 🙂


— Rudy Fleminger
sp@mmers.and.evil.ones.will.bow-down-to.us
(put "Hey!" in the Subject line for priority processing!)
http://www.pixelsaredead.com

A(Answer):

I noticed that Message-ID:
<1m*******************************@40tude.net> from FLEB contained the
following:

All your basename() are belong to us…

HAH. I was thinking the same thing! 🙂

Um… that was the pun 🙂

Oops.<blush>


Geoff Berrow (put thecat out to email)
It’s only Usenet, no one dies.
My opinions, not the committee’s, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/

LEAVE A COMMENT