note 26638 added to ref.ncurses
| From: | nweeks at utas dot edu dot au | Date: | Thu, 07 Nov 2002 22:23:27 +0000 |
| Subject: | note 26638 added to ref.ncurses | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-39103@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.
--
http://www.php.net/manual/en/ref.ncurses.php
http://master.php.net/manage/user-notes.php?action=edit+26638
http://master.php.net/manage/user-notes.php?action=delete+26638
http://master.php.net/manage/user-notes.php?action=reject+26638