note 26639 modified in ref.ncurses by irchtml
| From: | irchtml@php.net | Date: | Tue, 02 Mar 2004 11:27:25 +0000 |
| Subject: | note 26639 modified in ref.ncurses by irchtml | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-66091@lists.php.net to get a copy of this message | ||
With your CGI version of PHP compiled with ncurses support, console apps are amazingly easy!
For example:
whack the following into a file, chmod +x it, and run it.
#!/usr/local/bin/php -q
<?php
ncurses_init();
ncurses_border(25,25,18,18,24,24,23,23); // Do a lovely border
ncurses_move(1,1); // Start top left(inside border)
ncurses_addstr("Welcome to NCurses");
ncurses_addstr(" with PHP!");
ncurses_refresh(); // Send buffer to screen
ncurses_end(); // Clean up, and quit
?>
You'll notice the second addstr simply tacks onto the first.
--was--
With your CGI version of PHP compiled with ncurses support, console apps are amazingly easy!
For example:
whack the following into a file, chmod +x it, and run it.
#!/usr/local/bin/php -q
<?php
ncurses_init();
ncurses_border(25,25,18,18,24,24,23,23); // Do a lovely border
ncurses_move(1,1); // Start top left(inside border)
ncurses_addstr("Welcome to NCurses");
ncurses_addstr(" with PHP!");
ncurses_refresh(); // Send buffer to screen
ncurses_end(); // Clean up, and quit
?>
You'll notice the second addstr simply tacks onto the first.
http://www.php.net/manual/en/ref.ncurses.php