executing code from database

前端 未结 8 468
逝去的感伤
逝去的感伤 2021-01-29 14:42

I have a PHP code stored in the database, I need to execute it when retrieved.

But my code is a mix of HTML and PHP, mainly used in echo \"\";

A sample that look

8条回答
  •  无人共我
    2021-01-29 15:11

    Eval is not safe obviously.

    The best route IMO

    1. Save your data in a table

    2. Run a stored procedure when you are ready to grab and process that data

提交回复
热议问题