How to get the filename of a called PHP script

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stefan Mueller

    How to get the filename of a called PHP script

    I'd like to get the filename of a called PHP script.
    E.g. if you call

    I'd like to get within the PHP script 'start.php' the name 'start.php'.

    I've several PHP scripts and of course I could add at the beginning of each
    PHP script the name of the PHP script itself. But if there's a possibility
    to read its name from the filename I'd prefer this method.

    Stefan


  • ZeldorBlat

    #2
    Re: How to get the filename of a called PHP script


    Stefan Mueller wrote:[color=blue]
    > I'd like to get the filename of a called PHP script.
    > E.g. if you call
    > http://www.test.com/subdir/start.php
    > I'd like to get within the PHP script 'start.php' the name 'start.php'.
    >
    > I've several PHP scripts and of course I could add at the beginning of each
    > PHP script the name of the PHP script itself. But if there's a possibility
    > to read its name from the filename I'd prefer this method.
    >
    > Stefan[/color]

    One of these has what you want:
    <http://www.php.net/reserved.variab les>

    Comment

    • Stefan Mueller

      #3
      Re: How to get the filename of a called PHP script

      > One of these has what you want:[color=blue]
      > <http://www.php.net/reserved.variab les>[/color]

      Great, many thanks
      Stefan


      Comment

      Working...