Return html response from PHP page in to variable

前端 未结 2 1137
遥遥无期
遥遥无期 2021-01-23 16:12

I am trying to generate an email with some HTML that is created via another PHP file.

Email generating file is run by a cron running every hour. Another file exists that

2条回答
  •  再見小時候
    2021-01-23 16:39

    Check out the built-in functions ob_start and ob_get_clean.

    You can then do something like:

    ob_start();
    include( "file.php");
    $var = ob_get_clean();
    

提交回复
热议问题