Answer the question
In order to leave comments, you need to log in
How to modify the require or require_once connection flow?
Hello. There is a task: It is
necessary when connecting a file through require
or require_once
modifying the data inside. Modification should occur at the time of connection. The original files must not be modified.
Previously, a function was used for this task, eval
but it brings too many problems.
Are there any filters or modifiers?
PS
Thanks in advance!
PPS
We can put the question this way - how to modify the PHP execution flow? (Without extra libraries, using PHP tools)
You need to pull the data from the execution thread, modify it and write it to the thread that will execute it. This is something like a file filter.
Answer the question
In order to leave comments, you need to log in
To insert the so-called phtml or in general some popular template engine to connect, I recommend fenom , it works very fast.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question