You don't want ob_end_flush()
, you need ob_end_clean();
.
PHP catch echoed ouptut, save it and erase
Frage
I need to
- echo
- save what is echoed to variable
- do not display that echo
because I need to.
As far I was sure it could be done with buffers like:
ob_start();
$parallelcurl->startRequest($data[$name]['repository'], 'requestDone_list');
array_push($repository, ob_get_contents());
ob_end_flush();
But it actually echoes things saving them but no erase - I see loads of echoes that I dont want to.
Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow