How do I clear the terminal and show the output of my script after a blank terminal.
This is the top of my script:
#!/usr/bin/env php
<?php
require_once("setting/phpmailer/PHPMailerAutoload.php");
include('setting/mks.settings.php');
its the different question from my last, my last question is how to make my tag working, but in this question im asking how to make bash command clear working on my php bash @mario, thx The way I run this script as the bash script ./myfile
I want to make like the clear command on bash, but I don't know how to do so, when I put clear it just print out clear without clearing the terminal.
exec('clear');)?exec('clear');does not work. However, this following taken from @mario's duplicate does work on my machine:echo "\033[2J\033[1;1H";clearwould also work. But it might need something likepassthru("clear -T xterm 2>&1");because it also just returns the ANSI sequence instead of manipulating the terminal directly.