Smarty 有一个 {strip} 函数:
{strip}
<table border='0'>
<tr>
<td>
Hello world
</td>
</tr>
</table>
{/strip}
哪个输出:
<table border='0'><tr><td>Hello world</td></tr></table>
我也想在 Zend 中执行此操作(以减少每个请求发送的字节数),而不安装 Smarty。
但是,我不想向每个 Layout / .phtml 文件添加代码,所以前端控制器插件会很好。