note 54138 modified in features.commandline by danbrown

From: Date: Tue, 25 Nov 2008 15:48:44 +0000
Subject: note 54138 modified in features.commandline by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-146920@lists.php.net to get a copy of this message
For windows clearing the screen using "system('cls');" does not work (at least for me)... Although this is not pretty it works... Simply send 24 newlines after the output (for one line of output, 23 for two, etc Here is a sample function and usage: <?php function CLS($lines){ // $lines = number of lines of output to keep for($i=24;$i>=$lines;$i--) @$return.="\n"; return $return; } fwrite(STDOUT,"Still Processing: Total Time ".$i." Minutes so far..." . CLS(1)); ?> Hope This Helps, Wallacebw --was-- For windows clearing the screen using "system('cls');" does not work (at least for me)... Although this is not pretty it works... Simply send 24 newlines after the output (for one line of output, 23 for two, etc Here is a sample function and usage: function CLS($lines){ // $lines = number of lines of output to keep for($i=24;$i>=$lines;$i--) @$return.="\n"; return $return; } fwrite(STDOUT,"Still Processing: Total Time ".$i." Minutes so far..." . CLS(1)); Hope This Helps, Wallacebw http://php.net/manual/en/features.commandline.php

« previous php.notes (#146920) next »