argument

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

    argument

    Hi all

    I want to use php for shell scripts but I can't find anything about
    commandline arguments (like testscripts.php arg1 arg2 arg3).Is it possible
    to access the arguments in php?

    TIA
    Kaare
  • Andy Hassall

    #2
    Re: argument

    On Thu, 10 Jun 2004 20:07:16 +0200, "None" <none@none.no > wrote:
    [color=blue]
    >I want to use php for shell scripts but I can't find anything about
    >commandline arguments (like testscripts.php arg1 arg2 arg3).Is it possible
    >to access the arguments in php?[/color]



    --
    Andy Hassall <andy@andyh.co. uk> / Space: disk usage analysis tool
    http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space

    Comment

    • Alvaro G Vicario

      #3
      Re: argument

      *** None wrote/escribió (Thu, 10 Jun 2004 20:07:16 +0200):[color=blue]
      > I want to use php for shell scripts but I can't find anything about
      > commandline arguments (like testscripts.php arg1 arg2 arg3).Is it possible
      > to access the arguments in php?[/color]

      Sure:

      $_SERVER['argv']
      $_SERVER['argc']

      --
      --
      -- Álvaro G. Vicario - Burgos, Spain
      --

      Comment

      Working...