Single cmd session for all exec() calls - is this possible?
am 12.09.2007 12:57:23 von melmack3
Hello
My PHP script executes many cmd commands.
Functions like "exec()" or "system()" cause that new 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 cmd session on the begin of my script and execute
the commands such as in normal system opened 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
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Single cmd session for all exec() calls - is this possible?
am 12.09.2007 13:00:17 von Stut
Melmack wrote:
> My PHP script executes many cmd commands.
> Functions like "exec()" or "system()" cause that new 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 cmd session on the begin of my script and execute
> the commands such as in normal system opened 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.
The only way I can think of to do this is to use popen[1] to run a
shell. You can then send it commands and read the output.
-Stut
[1] http://php.net/popen
--
http://stut.net/
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php