Fork me on GitHub

command line with php  Bottom

  • hello

    is it possible to pass parameter to a zikula script with the command line of PHP ?

    thanks in advanced
  • no, i don't know how it can be done, for the moment i m using a wget , but i would like to avoid to pass by the http server.
  • I believe it's impossible because GET parameters are only available in GET/POST requests. All passed command line arguments are available through $argv (not through $_GET).

    Idea:
    Copy the index.php to mymodule_cmd.php and add somthing like

    Code

    $_GET['module'] = 'mymodule';
    $_GET['type'] = 'user';
    $_GET['func'] = 'bar';

    after the <?PHP



    edited by: planetenkiller, Apr 27, 2009 - 06:34 PM
  • planetenkiller, i was hoping for a hidden "command line" module which i didn't know about, which allow you to do this, (indeed as it's possible to hook on "systeminithooks", if a "systeminit" hook check for argv, it can be possible to run the specified command somehow)

    thanks anyway, your trick fit me well too :)
  • 0 users

This list is based on users active over the last 60 minutes.