using __FILE__

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Chad Lupkes

    using __FILE__

    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
    chadlupkes@eart hlink.net
  • FLEB

    #2
    Re: using __FILE__

    On 22 Nov 2003 16:21:04 -0800, Chad Lupkes wrote:
    [color=blue]
    > 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
    > chadlupkes@eart hlink.net[/color]

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

    For more information:


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

    Comment

    • Geoff Berrow

      #3
      Re: using __FILE__

      I noticed that Message-ID: <nppg75lyukcx$. 1ajf08tautgw9$. dlg@40tude.net>
      from FLEB contained the following:
      [color=blue]
      >All your basename() are quite helpful in this instance...[/color]


      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/

      Comment

      • Chad Lupkes

        #4
        Re: using __FILE__

        Hi Rudy,

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

        Thanks!

        --
        Chad Lupkes
        chadlupkes@yaho o.com

        "FLEB" <soon.the.sp@mm ers.and.evil.on es.will.bow-down-to.us> wrote in
        message news:nppg75lyuk cx$.1ajf08tautg w9$.dlg@40tude. net...[color=blue]
        > On 22 Nov 2003 16:21:04 -0800, Chad Lupkes wrote:
        >[color=green]
        > > 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
        > > chadlupkes@eart hlink.net[/color]
        >
        > 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.ev il.ones.will.bo w-down-to.us
        > (put "Hey!" in the Subject line for priority processing!)
        > -- http://www.pixelsaredead.com[/color]


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


        Comment

        • timmeh

          #5
          Re: using __FILE__

          > All your basename() are belong to us...

          HAH. I was thinking the same thing! :)


          Comment

          • FLEB

            #6
            Re: using __FILE__

            Regarding this well-known quote, often attributed to timmeh's famous "Sun,
            23 Nov 2003 06:01:47 GMT" speech:
            [color=blue][color=green]
            >> All your basename() are belong to us...[/color]
            >
            > HAH. I was thinking the same thing! :)[/color]


            Um... that was the pun :)

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

            Comment

            • Geoff Berrow

              #7
              Re: using __FILE__

              I noticed that Message-ID:
              <1mzqh7rvfee9o$ .1chhf24q3g5jq$ .dlg@40tude.net > from FLEB contained the
              following:
              [color=blue][color=green][color=darkred]
              >>> All your basename() are belong to us...[/color]
              >>
              >> HAH. I was thinking the same thing! :)[/color]
              >
              >
              >Um... that was the pun :)[/color]

              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/

              Comment

              Working...