I want to write the console output to a file AND to the console itself. To write the console output to a file I'm using this:
ob_start();
...
...
$output = ob_get_contents();
file_put_contents("cronjob.txt", $output, FILE_APPEND);
ob_flush();
But now I want also to print the output to the console instand of just writing it to a file. Is that possible and if yes, how can I do that?
Greetings and Thank You!