CGI variables: /usr/local/bin/php test.php --x=hello --y=123

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

    CGI variables: /usr/local/bin/php test.php --x=hello --y=123

    Hello

    My question is the following:
    I'm calling a PHP script as CGI over a shell a.e:
    /usr/local/bin/php test.php --x=hello --y=123

    How is it possible to access the variables x and y in the script.

    is there a special array where these variables are stored?
    I tried $_ENV and $_GET but it didn't work...


    Thanks for your help

    Yours sincerely


    Marc Giombetti
  • Colin McKinnon

    #2
    Re: CGI variables: /usr/local/bin/php test.php --x=hello --y=123

    Marc Giombetti wrote:
    [color=blue]
    > Hello
    >
    > My question is the following:
    > I'm calling a PHP script as CGI over a shell a.e:
    > /usr/local/bin/php test.php --x=hello --y=123
    >
    > How is it possible to access the variables x and y in the script.
    >
    > is there a special array where these variables are stored?
    > I tried $_ENV and $_GET but it didn't work...
    >[/color]

    argv/argc



    HTH

    C.

    Comment

    Working...