Thursday, January 22, 2015

Day Three Notes : Auto-publish@5

Running PHP from the CLI...

http://stackoverflow.com/questions/4186392/php-passing-get-in-linux-command-prompt

Use the php-cgi binary instead of just php, and pass the arguments on the command line, like this:
php-cgi -f index.php left=1058 right=1067 class=A language=English
Which puts this in $_GET:
Array
(
    [left] => 1058
    [right] => 1067
    [class] => A
    [language] => English
)

No comments:

Post a Comment