Re: Single cmd session for all exec() calls - is this possible?

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

 



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


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux