I have tried the following few bits of code and none of them seem to work under XAMPP.
- Code: Select all
exec('command /C cls');
passthru('command /C cls');
function clearscreen($out = TRUE) {
$clearscreen = chr(27)."[H".chr(27)."[2J";
if ($out) print $clearscreen;
else return $clearscreen;
}
clearscreen();
All that happens is some weird characters get displayed on screen. I've even tried having a file called clearscreen.cmd which works fine when run from the command line but when called from PHP it too just displays the same weird characters. I've had a look through my php.ini file but can't find anything that would seem to cause this. This happened on XAMPP 1.6.8 and still happens now I've updated to 1.7.0.
Does anyone know why this happens and how I can fix it?