我希望在一个以数据为重/用户为中心的网站上实现varnish。如何使用使用php包含html模板的系统设置ESI?
发出页面请求->php计算逻辑->php包含html模板页面并填充变量->页面输出
我只见过esi标记主要用于html页面,包括php片段。
The time is:
at this very moment.
但是可以换个方式吗?e、 g.php页面中的esi标记包括html片段?
与此类似:
//logic here
$content = "this will be displayed on the content page"
include("templates/header.html.php"); //esi would go here since page is static content
include("templates/content.html.php"); //no esi here, since page is dynamic content
include("templates/footer.html.php"); //esi would go here since page is static content
?>