OK, now I searched everywhere to do this, and apparently no one on the Internet knows what happened. And on the Internet, I mean Google with its help.
I am writing a terminal application in PHP to run in the PHP CLI on the Windows 7 (x64 Ultimate) command line. In the program I want to clear the screen. The data displayed on the screen can be any number of characters spanning any number of lines. I do not want any hackers or instructions for using carriage return. I want to clear the screen.
CMD has a fancy CLS team that does just that. So, when I run the PHP line system('cls');or any variation of the clear screen command (including one answer that said it was being used system("command /C cls");that didn't work), the terminal displays the venus character. The girl signs the "inverted holy hand grenade," whatever you call it. As it turned out, this is apparently a way to show a linefeed character (which, if the terminal really behaved as it should, will clear the screen.)
Why does the CLI in PHP think that showing the girl CMD will clear the screen and how can I get the CMD to really clear? I tried to send it to the line feed character, sending him the girl character, sending him chips and cookies and all kinds of nice things. Nothing succeeded. Therefore, the screen will forever remain unclear what you can imagine, can be annoying when you need to redraw something. In any case, your help is appreciated.
source
share