• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

PHP CLI and clearing the command prompt

Isatis

If specified, this will repl[0x00000000]ce the
Premium
BRoomer
Joined
Dec 18, 2008
Messages
10,253
Location
San Francisco, CA
NNID
reverite
I've been working on the Brawl+ Autoupdater for Windows which uses PHP CLI converted to EXE format so casual users can execute it. (Bamcompile sadly won't work on Windows 7 unfortunately ;_; so have to turn to alternative methods)

One issue is trying to call the "cls" command during the script.

Doing stuff in batch like
Code:
@echo off
echo You're never gonna see this text
cls
echo but you're gonna see this!
pause

-----
expected output:
-----
but you're gonna see this!
Press any key to continue....
will work, but if I'm trying to achieve the same thing in PHP CLI...

Code:
<?php
echo "You're never gonna see this text! ";
system("cls");
echo "but you're gonna see this!";
system("pause");
?>

----
expected output:
----
You're never gonna see this text! but you're gonna see this!
Press any key to continue....
Yet if you ran Unix, Linux or Mac
Code:
system("clear");
did the job quite well because clear was an actual program.

I've tried everything I can, using these:
system("cls");
system("command /c cls");
system("cmd /c cls");
and swapping out system() for exec()

None of the three work though. What I'm trying to figure out is, is there a solid command I can call to clear the command line the way cls does? I've tried everything without resorting to external files and nothing.
 
Top Bottom