سؤال

I am trying to display some info from a ajax call using firephp and firebug.I am able to display someinfo when the ajax call is done. Is there a way to display while it is executing? For example my code below id inside a foreach loop.

foreach ($this->PreQualcalls as $value) {    
ob_start();
if(isset($array ['env:Envelope'] ['env:Body']['n1:preQualResponse1207'])){
                $this->setKeyNamePreQualResponse("n1:preQualResponse1207");
                $this->setKeyNameServiceProducts("n1:ServiceProduct1207");
                $this->setKeyNameModemProducts("n1:ModemProduct1207");
                $this->firephp->log("entered the 1207 call");
            }else{
                $this->setKeyNamePreQualResponse("n1:preQual1308Response");
                $this->setKeyNameServiceProducts("n1:ServiceProduct1308");
                $this->setKeyNameModemProducts("n1:ModemProduct1308");
                $this->firephp->log("entered the 1308 call");
            }
ob_flush();
$this->firephp->log($this->getKeyNamePreQualResponse(),"Response type");
}

i want to be able to display getKeyNamePreQualResponse() in the console as it is being going through the loop.

Is it possible?

thank you.

هل كانت مفيدة؟

المحلول

FirePHP is designed to collect log information while the PHP script executes and then sends it in special headers along with the page response. It will not show logging calls in Firebug in realtime.

To debug your code using logging, place more logging calls into the loop. e.g.

$this->firephp->log("value", $value);

You have a loop that assigns a new value to $value on each iteration but don't use it in any of the statements in the loop. That does not seem right.

If you need realtime debugging I suggest using xDebug or other realtime logging tool.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top