|
Posted by Rich on 02/14/06 19:56
In article <45edetF6a43eU1@individual.net>, J.O. Aho says...
>
>MS wrote:
>>> When checking the php.net site there were a few examples of background
>> processes
>>> using exec() that may work out okay. I think some of these writing all
>> output to
>>> /dev/null and setting it as a background process with "&".
>>>
>>> exec('php /path/to/thumb.php > /dev/null 2>&1 &');
>>>
>>> Similar to your suggestion, but it looked like shell_exec may be expecting
>>> results to store in a variable.
>>>
>>
>> I will give this a go, but could you point me in the direction of where I
>> can learn what the parameters are in this function.
>>
>> the http://uk2.php.net/manual/en/function.exec.php page does not let me know
>> what the parameters are or could be. etc..
>>
>>
>$lastlinefromfunction = exec('limited by the console
>command',$array_ofwholeoutput,$returnvaluefromconsolecommand);
>
>In *nix world the console command returns either 0 or 1 (there are exemptions
>where an error value is returned), depending if the function did execute
>properly or not. $returnvaluefromconsolecommand
>
>the exec() returns the last line from the command executed.
>$lastlinefromfunction
>
>the $array_ofwholeoutput is the complete output from the command, first line
>is $array_ofwholeoutput[0], next line is $array_ofwholeoutput[1] and so on.
>
>This is quite well documented at the
>http://www.php.net/manual/en/function.exec.php
>
>What you put in between the single/double quotes depends on what you want to
>do, and parameters for the console command depends which one you use, for more
>info there you will need to use the manual page: man <command>
>
>
> //Aho
Thank you for the extra information and clarification.
Rich
--
Newsguy Bandwidth Blowout Feb-21-2006
http://newsguy.com/nolimits.htm
[Back to original message]
|