Can you render a PHP file into a variable?

前端 未结 5 1943
孤城傲影
孤城傲影 2020-12-28 08:51

If I have a hello.php file like this:

Hello, !

I would like to do something like this in some php code:

         


        
5条回答
  •  梦谈多话
    2020-12-28 09:39

    You can do this with output buffering, but might be better of using one of the many template engines.

提交回复
热议问题