Great question. Use the $_GET method array parameters, ie:

qsh cmd('/usr/local/zend/core/bin/php -f +
/www/zendcore/htdocs/printorderPDF.php?ordernumber=1234567')

This will provide a _GET array element called ordernumber with a value
of 1234567.

This feature is detailed at w3schools at
http://www.w3schools.com/PHP/php_get.asp

Regards,

Mike

mike.p@xxxxxxxx Cell: (408)679-1011 Office: (815)722-3454



-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]
On Behalf Of Kelly Cookson
Sent: Wednesday, November 11, 2009 9:53 AM
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] Suggestion: CL Command for PHP Scripts

When using that command in a CL program to call a PHP script, how do you
pass parameters back and forth? Or can you?

Thanks,
Kelly

-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]
On Behalf Of Mike Pavlak
Sent: Wednesday, November 11, 2009 9:48 AM
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] Suggestion: CL Command for PHP Scripts

Matt,

Is the following command to cumbersome?

qsh cmd('/usr/local/zend/core/bin/php -f +
/www/zendcore/htdocs/printorderPDF.php')

This is an example of invoking the CLI module of PHP from a CL program.
The CLI is /usr/local/zend/core/bin/php and the PHP script is
/www/zendcore/htdocs/mpavlak/php102/PHP102W3Ex3.php.

Let us know if this works for you. This format should work for ANY
qshell function and is a great way to offload work into an asynchronous
process in your PHP scripts. There is also a new feature that is coming
in Zend Server called the Job Queue function that allows your PHP
scripts to schedule jobs via the Zend Server system and you can track
them to successful completion.

Regards,

Mike

mike.p@xxxxxxxx Cell: (408)679-1011 Office: (815)722-3454



-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]
On Behalf Of MattLavinder@xxxxxxxxxxxxxxxxxxx
Sent: Wednesday, November 11, 2009 8:46 AM
To: web400@xxxxxxxxxxxx
Subject: [WEB400] Suggestion: CL Command for PHP Scripts



Mike said:
And, as Jon alluded to, Zend Server for IBM i should have only one
Apache server making this stuff a who lot easier!

Mike-,

Glad to hear about this. I have another suggestion for Zend. It'd be
great if you guys could include a CL command for running PHP CLI
scripts.
This would be consistent with how IBM and many third-parties treat PASE.
Usually they create CL commands so there's no need to bring up QSHELL.
Moving to a single instance of Apache is a big step in making PHP appear
much more native. A CL command for running PHP scripts would accomplish
the
same sort of thing.

Just my two cents.

Matt


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.