Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: ncurses_clear - Manual
[go: Go Back, main page]

PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net

search for in the

ncurses_clrtobot" width="11" height="7"/> <ncurses_cbreak
Last updated: Wed, 01 Nov 2006
view this page in

ncurses_clear

(PHP 4 >= 4.1.0, PHP 5)

ncurses_clear -- スクリーンをクリアする

説明

bool ncurses_clear ( void )

警告

この関数は、 実験的 なものです。この関数の動作・ 名前・その他ドキュメントに書かれている事項は、予告なく、将来的な PHP のリリースにおいて変更される可能性があります。 この関数は自己責任で使用してください。

ncurses_clear() は、空白を設定せず 完全に画面を消去します。成功した場合に TRUE を、失敗した場合に FALSE を返します。

注意: ncurses_clear() は空白を設定せずに 画面を消去します。つまり、現在の背景の状態が残されるということです。 空白文字で画面を消去するには ncurses_erase() を使用します。

ncurses_erase() も参照ください。



add a note add a note User Contributed Notes
ncurses_clear
areaz at dotgeek org
14-May-2004 07:49
When your script exits, after ncurses_clear() was called, it could leave your terminal in an inconsistent state.

Therefore, you should call ncurses_savetty() in a constructor and nurses_resetty() in a destructor, to ensure, that your terminal is working fine after your script exits.

Here is an example code snippet, on how to use this function, without falling into trouble ;-)

<? // PHP5 Example

class foo
{
  
/* Foo constructor */
  
function __construct()
   {
      
/* Initialize ncurses first */
      
ncurses_init();

      
/* Save your tty !!! */
      
ncurses_savetty();
   }

   function
bar ()
   {
      
/* Clear the screen and wait a few seconds */
      
ncurses_clear();

      
sleep(5);
   }

  
/* Foo destructor */
  
function __destruct()
   {
      
/* Restore your terminal settings */
      
ncurses_resetty();

      
/* End ncurses and clean up */
      
ncurses_end();
   }

}

$test_ncurses = new foo;
$test_ncurses->bar();
?>

ncurses_clrtobot" width="11" height="7"/> <ncurses_cbreak
Last updated: Wed, 01 Nov 2006
 
 
show source | credits | sitemap | contact | advertising | mirror sites