I have PHP CLI application. I play sounds via mplayer on errors:
ob_start();
shell_exec('mplayer ./SadTrombone.mp3');
ob_end_Clean();
Sound is OK, but ob_end_clean()
take no effect here - I get following output:
I have PHP CLI application. I play sounds via mplayer on errors:
ob_start();
shell_exec('mplayer ./SadTrombone.mp3');
ob_end_Clean();
Sound is OK, but ob_end_clean()
take no effect here - I get following output:
You can prevent the unwanted output from your command from appearing on the console, by redirecting the output from STDOUT and STERR to /dev/null, like so:
shell_exec('mplayer ./SadTrombone.mp3 > /dev/null 2>&1');