Background Process

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
I have two php scripts, first one must pass arguments to second(the php
script that will take more time to process for example inserting 1000000
records to db, data come from first script). I search around web and find
below function:



function execInBackground($path, $exe, $additional) {
    global $conf;

    if (file_exists($path . $exe)) {
        chdir($path);
        if (substr(php_uname(), 0, 7) == "Windows"){
            echo 'going Windows';
            pclose(popen("start \"bla\" \"" . $exe . "\" "  . $additional,
"r"));           } else {
                exec("./" . $exe . " " .  $additional . " > /dev/null
&");           }
    }
}

But I don't know how to pass variables to the second file? and how to use of
this function?
in *windows* enviroment... and return value of second file to first..

Thanks in advance
shahrzad

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux