RE: [PHP-GTK] Can a Php-Gtk app accept command line arguments?
| From: | Nghia | Date: | Thu, 13 Jan 2005 21:52:29 +0000 |
| Subject: | RE: [PHP-GTK] Can a Php-Gtk app accept command line arguments? | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-5443@lists.php.net to get a copy of this message | ||
Its similar to C.
C:\php4\php something.php param1 param2
You can access the arguments with the $argv variable.
$argv[0] - program name
$argv[1] - argument 1 and so on
-----Original Message-----
From: dpgirago@mdanderson.org [mailto:dpgirago@mdanderson.org]
Sent: Friday, 14 January 2005 4:32 AM
To: php-gtk-general@lists.php.net
Subject: [PHP-GTK] Can a Php-Gtk app accept command line arguments?
I've a need to create an application that can accept command line
arguments.
Essentially, a patient ID and a treatment field (e.g., a right lung tumor)
would be selected from the hospital's main patient information management
system, then passed to the application in question, which would then query
the hospital's database using the passed arguments as filters. The app
must be separate from the other hospital software because of FDA approval
issues.
I prototyped for my employer a PHP-GTK application that allowed the user
to select patient and treatment field within the application, then do
various other treatment related stuff with it, and this all worked very
well, but this approach seems to be not secure enough in regard to
selecting the correct patient, etc... leading to the above specification.
So before I proceed further with PHP-GTK, I need to determine if a PHP-GTK
application can accept command line arguments. If so, can someone provide
a brief example about how to catch the arguments inside the application?
And lastly, please cc me if replying. Mail from the lists.php.net domain
has not been getting through since before Xmas.
Thank you all.
David