473,406 Members | 2,390 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Clear screen

Hi,

I'm using PHP on my Linux box on the command line.

It need to clear the screen, as I would do with the 'clear' command on
the bash. Is there something equivalent in PHP available?

regards,
georg

Jul 17 '05 #1
2 14292
Carved in mystic runes upon the very living rock, the last words of Georg
Weiler of comp.lang.php make plain:
I'm using PHP on my Linux box on the command line.

It need to clear the screen, as I would do with the 'clear' command on
the bash. Is there something equivalent in PHP available?


ereg(":li#([0-9]+):", $TERMCAP, $regs);
$lines = $regs[1];
echo str_repeat("\n", $lines);

Or, for PHP3:

while ($lines--) echo "\n";

--
Alan Little
Phorm PHP Form Processor
http://www.phorm.com/
Jul 17 '05 #2
StF
Why don't you try exec("clear") ???
read more of exec in php manual

greetz Seymour
"Georg Weiler" <ge******@gmx.at> wrote in message
news:3f***********************@usenet.univie.ac.at ...
Hi,

I'm using PHP on my Linux box on the command line.

It need to clear the screen, as I would do with the 'clear' command on
the bash. Is there something equivalent in PHP available?

regards,
georg

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: NeoPhreak | last post by:
How would you clearn the screen in a console program??? Thanks NeoPhreak >.<
0
by: Peter | last post by:
I am just trying to learn python, to use for some fairly basic command line utilities which will run in either Windows/DOS or Linux. I cannot find a platform neutral way of manipulating the screen....
20
by: ritchie | last post by:
Hi, I am trying to clear the screen in my program. I am loking for something that will work on all compilers, especially Borland & MS Visual Studio 6. On Visual studio I used 'system("cls");'...
4
by: John | last post by:
Hi I have the following in a Perl script. I just want to "clear screen" but it does not work. I don't think I've got my client and server sides confused. Any ideas? <SCRIPT...
8
by: REDBAIT | last post by:
Hi Guys, Am using Windows 2000 and Dev C++ to create C programs. I'm trying to use clear screen and other graphic functions such as positioning output on screen. Have seen some documents that...
0
by: sajithamol | last post by:
I have an Applet that has three buttons on it, one being a clear screen button. I have it setup right now so it draws a rectangle the size of the applet and fills it with the background color. But...
2
by: owl | last post by:
and here I thought I was going to finally be able to change the world AND contribute back to python with my amazing clear screen extension - but I can't get it to work. ;( Copying from...
9
by: pbd22 | last post by:
Hi. Does anybody know how to issue a clear screen command like DOS "cls" in a telnet session? Thanks!
5
by: Kid Programmer | last post by:
Hello guys. I was wondering how you can clear the screen in a java program. Here is the code for my program: import javax.swing.SwingUtilities; import javax.swing.JFrame; import...
1
by: sganeshsvk | last post by:
i want to clear the screen command prompt for mysql in windows XP... In linux we use (CTRL + L) for clear the screen in mysql prompt.... i already use this command ( \c ) then ( \! clear ) for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.