You are here: Re: Execute a program from PHP CLI and allow user interaction « PHP « IT news, forums, messages
Re: Execute a program from PHP CLI and allow user interaction

Posted by "n.g." on 11/23/05 06:17

use proc_open , connect stdin/out of php cli to nano, i guess

On 11/23/05, Jasper Bryant-Greene <jasper@album.co.nz> wrote:
> Hi all
>
> This one's got me stumped. I'm working on a PHP CLI interface, and I
> need to allow the user to input a bit of HTML.
>
> Rather than bandy around with readline() and the like, I thought it
> would be nice to just create a temporary file, pop nano up, and read and
> then delete the file once it's been edited. That way I get nano's syntax
> highlighting and other useful features.
>
> However, I can't for the life of me figure out how to allow the user to
> interact with nano once the process has been launched. The usual culprits:
>
> {exec,system,shell_exec}( "nano tmpfile.txt" );
>
> all just hang (top shows nano is running, but it doesn't seem to be
> attached to the terminal).
>
> How can I launch a process and attach it to the terminal PHP CLI was
> launched from so that the user can interact with it?
>
> TIA
> --
> Jasper Bryant-Greene
> General Manager
> Album Limited
>
> +64 21 708 334
> jasper@album.co.nz
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
Tomorrow will be a good day :-)

 

Navigation:

[Reply to this 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

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