Hello everyone, I encountered a problem when I was using php to do a project.
If you want to output a piece of html content with <?php ... ?>, usually write include or require file name at the end for output.
But I put this HTML content directly in the database. If I want to output it, can I only create a temporary file first, and then use the include temporary file name to output it? Is there any other way?
You can directly Eval, but there are security risks
For example, the cache after template compilation mostly uses temporary files. If you want to store it in the database, you can also use the eval function. However, it is recommended to use cache files. The database must not be well designed.