Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

using __FILE__

0 views
Skip to first unread message

Chad Lupkes

unread,
Nov 22, 2003, 7:21:04 PM11/22/03
to
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
chadl...@earthlink.net

FLEB

unread,
Nov 22, 2003, 7:34:07 PM11/22/03
to

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

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

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

Geoff Berrow

unread,
Nov 22, 2003, 7:52:41 PM11/22/03
to
I noticed that Message-ID: <nppg75lyukcx$.1ajf08tautgw9$.d...@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/

Chad Lupkes

unread,
Nov 23, 2003, 12:40:55 AM11/23/03
to
Hi Rudy,

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

Thanks!

--
Chad Lupkes
chadl...@yahoo.com
http://www.seattlewebcrafters.com/
"FLEB" <soon....@mmers.and.evil.ones.will.bow-down-to.us> wrote in
message news:nppg75lyukcx$.1ajf08tautgw9$.dlg@40tude.net...


---
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


timmeh

unread,
Nov 23, 2003, 1:01:47 AM11/23/03
to
> All your basename() are belong to us...

HAH. I was thinking the same thing! :)


FLEB

unread,
Nov 23, 2003, 10:49:32 AM11/23/03
to
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 :)

Geoff Berrow

unread,
Nov 23, 2003, 11:30:01 AM11/23/03
to
I noticed that Message-ID:
<1mzqh7rvfee9o$.1chhf24q3g5jq$.d...@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>

0 new messages