Reply to Re: Execute extneral programs with interactivity?

Your name:

Reply:


Posted by Mike Willbanks on 10/20/05 03:02

weberjacob@gmail.com wrote:
> I'm using PHP in command-line mode. I would like to run an external
> command, and have it interact with the user just as if he had ran it
> from a shell. (I don't need my script to send input to the command).
> Ideally I would also like to capture the STDOUT into a variable,
> although this is not a requirement.
>
> None of the PHP program-execution commands seem to work for me. The
> closest I've come is:
> system("ftp")
> which takes user input, but it seems to buffer the output until you
> type something other than a carriage return. I want it to behave
> exactly as it does from a shell. Is this possible?
>
> Thanks,
> Jacob
>
Take a look at proc_open.

http://www.php.net/proc_open


--
Mike Willbanks
Zend Certified Engineer
http://www.digitalstruct.com

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация