View Full Version : Command to clear screen in PHP?
Is there a Clear Screen command in PHP? Thanks!
Clear what screen? The browser page?
Spookster
12-04-2002, 01:03 PM
T.V. Screen? lol
bcarl314
12-04-2002, 02:10 PM
I think they're asking for the command to clear the screen when your using php from the command line. Like clr in DOS or clear in Linux. Is it possible wiht PHP from the command line?
ConfusedOfLife
12-04-2002, 09:27 PM
Check this out!
http://www.phpbuilder.com/board/showthread.php?s=&threadid=10219750
:D
fish_liver_oil
12-20-2006, 08:35 PM
Hi, using the exec and system commmands might not work,
but if you use the passthru command, combined with the clear bash command, it WILL work. that is:
passthru('clear');
that will clear the screen
ralph l mayo
12-20-2006, 10:27 PM
sweet thread. I installed php5-cgi just to verify this works:
function cls()
{
array_map(create_function('$a', 'print chr($a);'), array(27, 91, 72, 27, 91, 50, 74));
}
edit: caveat: only tested in xterm and konsole, but I don't see why it wouldn't work on DOS or a television or an etch-a-sketch.
rafiki
12-21-2006, 10:11 AM
edit: caveat: only tested in xterm and konsole, but I don't see why it wouldn't work on DOS or a television or an etch-a-sketch.
Quality, havent even heard of an etch-a-sketch for years :D
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.