Storing the HTML output from a local PHP file into a string using file_get_contents

前端 未结 4 736
囚心锁ツ
囚心锁ツ 2020-12-10 18:13

There is a header.php file and it contains some php codes that return HTML. I know I can use require, include to echo the results, but what I want to do is to store its proc

4条回答
  •  星月不相逢
    2020-12-10 19:04

    I'd rather use require() wrapped inside ob_start() and ob_get_clean(). I am sure there is nothing wrong with this approach.

提交回复
热议问题