Afficher un message
Vieux 12/09/2007, 13h36   #2
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Single cmd/bash session for all exec() calls - is this possible?

melmack3@gmail.com wrote:
> Hello
>
> My PHP script executes many bash/cmd commands.
> Functions like "exec()" or "system()" cause that new bash/cmd session
> is started,
> the command is executed and the session is closed. Unfortunately
> it is very slow process so I would like to increase performance and
> open one bash/cmd session on the begin of my script and execute
> the commands such as in normal system opened bash/cmd window and close
> it
> at the end of my PHP script.
> Does anybody know whether and (if yes) how can I do that?
>
> PS. I need the retrieve informations from previous command before
> executing next command because next command is strongly dependent on
> the
> results from previous command.
>
> Best regards
> Melmack
>


Melmack,

You might be able to open the command shell with proc_open() and
communicate through the pipes.

I've never tried it in PHP, but done similar in C before.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
  Réponse avec citation
 
Page generated in 0,04676 seconds with 9 queries