Calling PHP from CGI & Return values...

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

    Calling PHP from CGI & Return values...

    If I write a CGI script that, as a part, calls a PHP script, can the PHP
    script return a value to the caller? Is this something that is done. I
    know it seems like I shoudl just do everything in the PHP script, but
    unfortunately, at this time, that's not possible. Of course, we're talking
    about all server-side stuff. Thank you in advance for your help.


  • CountScubula

    #2
    Re: Calling PHP from CGI & Return values...

    "arenaTR" <arenaTR@comcas t.net> wrote in message
    news:Q5ydne1ASd WyM9HdRVn-uw@comcast.com. ..[color=blue]
    > If I write a CGI script that, as a part, calls a PHP script, can the PHP
    > script return a value to the caller? Is this something that is done. I
    > know it seems like I shoudl just do everything in the PHP script, but
    > unfortunately, at this time, that's not possible. Of course, we're[/color]
    talking[color=blue]
    > about all server-side stuff. Thank you in advance for your help.
    >
    >[/color]

    Short answer , Yes.

    If you are writing the CGI in perl, you can do something like this:

    $return = `php -q scriptname.php param1 param2`;

    and use print statements in your php script, and all output will be in var
    $return

    --
    Mike Bradley
    http://www.gzentools.com -- free online php tools


    Comment

    Working...