A
A
atis //2015-09-08 12:39:11
Yii
atis //, 2015-09-08 12:39:11

How is the $content variable formed in Yii2?

Interested in how it is formed.
When generating, how are the files read.?
I noticed that the view files contain not only html, but also php code. seems to fit, but in this case, you need to assign the entire html in the file to a variable and already return the variable.
$content = require 'file.php';

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Pavlenko, 2015-09-08
@atis2345

If I'm not mistaken, ob_start
can be used. That is, this is a function that does not display the page as it is, but writes it to a buffer that can be retrieved using the ob_end_clean () function.
Even if the system is not like that, I think the principle itself is quite close to this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question