Ich verwende PHP SOAP und die Schleife läuft mit 10 Iterationen. Das Problem, das ich habe, ist, dass es nicht ausgegeben wird, bis die Schleife abgeschlossen ist, wobei jede Ausgabe auf einmal angezeigt wird.
Wie kann ich es einzeln ausgeben lassen, während es durch die Schleife verarbeitet, anstatt alles auf einmal zu machen, nachdem es die ganzen 10 Schleifen vervollständigt hat?Die Ausgangsschleife einzeln nacheinander und nicht auf einmal?
<?php
$loops = 0; // set loops to 0
// connection credentials and settings
$location = 'https://theconsole.com/';
$wsdl = $location.'?wsdl';
$username = 'user';
$password = 'pass';
// include the console and client classes
include "class_console.php";
include "class_client.php";
// create a client resource/connection
$client = new Client($location, $wsdl, $username, $password);
while ($loops < 10)
{
$dostuff;
$echo "It has done: " .$stuff; // display output
ob_end_flush(); ob_flush(); flush(); ob_start(); // added as per comments below - still not working
}
?>
Vielen Dank!
Aktualisierte Frage, immer noch nicht funktioniert :( – Dov