Answer the question
In order to leave comments, you need to log in
Number of disk system accesses of a standard php template engine?
generate view
controller.php
return $this->render('date', ['data' => $data, 'date' => $date]);
<section class="article-list">
<h5><?= $date?> </h5>
<?php foreach ($data as $news) echo $this->render('_list_item', ['news'=>$news]); ?>
</section>
<section class="article-list">
<h5><?= $date?> </h5>
<?php foreach ($data as $news) : ?>
<div class="article"> <?php /* код из _list_item.php */ ?> </div>
<?php endforeach; ?>
</section>
public function renderPhpFile($_file_, $_params_ = [])
{
ob_start();
ob_implicit_flush(false);
extract($_params_, EXTR_OVERWRITE);
require($_file_);
return ob_get_clean();
}
Answer the question
In order to leave comments, you need to log in
I advise you to put something like https://github.com/rlerdorf/opcache-status and watch the status of the opcache, well, you can simply collect statistics - turn off the opcache - collect again - clearly see if it works.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question