Professional Web Applications Themes

Get .PHP Filename? - PHP Development

I've been looking thru my PHP functions and can't find what I need - is there a function that will tell me what .php file is currently executing? Thanks......

  1. #1

    Default Get .PHP Filename?

    I've been looking thru my PHP functions and can't find what I need -
    is there a function that will tell me what .php file is currently
    executing?

    Thanks...

    Ralph Freshour Guest

  2. #2

    Default Re: Get .PHP Filename?

    Ralph Freshour <ralphprimemail.com> wrote in
    news:21rvlvo3crema1kiontqaklkl8len3230r4ax.com:
    > I've been looking thru my PHP functions and can't find what I need -
    > is there a function that will tell me what .php file is currently
    > executing?
    >
    $_GET['SCRIPT_NAME'] will give you the current path, without any GET data.
    I think.

    $_GET['REQUEST_URI'] will give you the full URI, including any GET data.

    --
    Larry Flynt for Governor!
    Bringing dignity back to the Governor's Mansion

    Terry Austin
    [email]taustinhyperbooks.com[/email]
    [url]http://www.hyperbooks.com/[/url]
    Terry Austin Guest

  3. #3

    Default Re: Get .PHP Filename?


    "Ralph Freshour" <ralphprimemail.com> wrote in message
    news:21rvlvo3crema1kiontqaklkl8len3230r4ax.com...
    > I've been looking thru my PHP functions and can't find what I need -
    > is there a function that will tell me what .php file is currently
    > executing?
    >
    > Thanks...
    >
    $_SERVER['PHP_SELF'] is just one of a number that could tell you what you
    want... A whole host of other interesting values are available if you just
    call phpinfo(); and check the output (which is in a nice clean table). Note
    though that some variables are sent by the client (browser) and not all
    clients (browsers) send the same amount of data (ie some reveal more
    information, others don't - and some (like me) who have Norton Internet
    Security 2003 have some of the headers sent by the client removed before
    they hit the server (meaning minimum amount of data).

    But if its just findiing out about server side values, then you should/can
    rely on phpinfo(); to help you out.


    Randell D. Guest

  4. #4

    Default Re: Get .PHP Filename?


    "Ralph Freshour" wrote: I've been looking thru my PHP functions and can't
    find what I need -
    > is there a function that will tell me what .php file is currently
    > executing?
    $_SERVER['PHP_SELF'] is the 'parent' script you are executing. If you
    include several files into it, $_SERVER['PHP_SELF'] would still be the
    same.
    If you need the filename of included files into themselfs, use __FILE__.


    Rainer Erismann Guest

  5. #5

    Default Re: Get .PHP Filename?

    Ralph Freshour <ralphprimemail.com> schrieb:
    > I've been looking thru my PHP functions and can't find what I need -
    > is there a function that will tell me what .php file is currently
    > executing?
    Use the function phpinfo() and have a look at all those variables at the
    end of the page. You might get some more ideas about your task. :-)

    Matthias
    Matthias Esken Guest

Similar Threads

  1. Get pdf filename during initialize:
    By cstham@adobeforums.com in forum Adobe Acrobat SDK
    Replies: 9
    Last Post: July 21st, 06:50 AM
  2. Getting only the filename ??
    By vij010 in forum Macromedia Director Basics
    Replies: 1
    Last Post: October 3rd, 04:21 AM
  3. Opening the same filename
    By J. E. Goodman in forum FileMaker
    Replies: 3
    Last Post: September 18th, 03:10 PM
  4. PC to Mac jpg Filename Problem
    By webbolts in forum Adobe Photoshop 7, CS, CS2 & CS3
    Replies: 4
    Last Post: September 5th, 10:13 PM
  5. Invalid filename
    By jinglao webforumsuser@macromedia.com in forum Macromedia Dreamweaver
    Replies: 5
    Last Post: July 17th, 10:04 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139