note 26638 deleted from ref.ncurses by betz
| From: | betz@php.net | Date: | Thu, 07 Nov 2002 23:12:55 +0000 |
| Subject: | note 26638 deleted from ref.ncurses by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-39105@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.