M
M
maiskiykot2018-12-25 10:07:37
Yii
maiskiykot, 2018-12-25 10:07:37

How to intercept data output to Yii2 browser?

Somehow caught a strange glitch. One view outputs data in a stream (updating by ajax). Those. everything is collected there . I'm trying to collect everything in the $out buffer in order to display it according to the if condition. However, for some reason, it starts to display bits of code in the browser with the frequency of the ajax timeout. How to intercept data correctly? <?= $order->lala->topolya; ?>$out = $order->lala->topolya;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vnpp, 2019-01-17
@vnpp

try

<?php
ob_start();
echo $order->lala->topolya;
$out = ob_get_clean();
?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question