couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Hammer <st...@dahammer.net>
Subject Re: Running Extern PHP Script
Date Wed, 23 Oct 2013 20:08:18 GMT
On Wed, Oct 23, 2013 at 10:26 AM, Scott Weber <scotty2541@sbcglobal.net> wrote:
> My test script is AMAZINGLY simple, as a tutorial to test with:
>     <?php
>     $line1 = trim(fgets(STDIN));
>     fwrite(STDOUT, "{\"code\":200 , \"body\" : \"The script ran\" }\n");
>     fflush(STDOUT);
>     ?>


Try the following modification to your test script. It loops the STDIN
input as Robert stated.

    <?php
    while($line1 = trim(fgets(STDIN))) {
        fwrite(STDOUT, "{\"code\":200 , \"body\" : \"The script ran\" }\n");
        fflush(STDOUT);
    }
    ?>

-Steve

-- 
Steve Hammer

/* If Linux doesn't have the solution, you have the wrong problem */

Mime
View raw message