File_A includes (include / require) file_B, and that includes file_B

Please tell me how to correctly determine the size of file_B with file_B (it turns out the sum of sizes) while in file_A? After all, file_A knows only about file_B when calculating the size.

  • one
    Hm With this formulation of the question, I think it is worth looking towards ob_start + ob_get_clean - Maxim Timakov
  • @MaximTimakov, thanks for the reply. Tell me, does this approach put a heavy load on the server? After all, it turns out the whole page along with the inclusions is stored in memory. I'm just on a free hosting, and there surely a little bit is thrown out right away - tonchikp
  • one
    If I'm not mistaken, the page without them first goes to memory. - Maxim Timakov
  • 2
    To begin with, it would be nice to explain why such a perversion was in principle needed - Ipatyev
  • @ Ipatiev, for example, in the idea of ​​MVC, the controller file connects the view, or the controller connects the model. I need to display information about changing the page (based on resizing or just the modification date), but the page is composed of three components and the change of each must be taken into account. If there is a better way, tell me - tonchikp

0