我需要在Twig模板中包含文件的内容(在我的资源文件夹中).
我试过这个没有运气:
{% include 'public/directory/file.ext' %}
Run Code Online (Sandbox Code Playgroud)
这不是Twig的能力吗?(我不想使用Assetic)
我正在使用Dompdf来生成php中的报告.我无法将相同的外部样式表包括在内......
我使用的代码类似于以下内容:
<?php
require_once "dompdf/dompdf_config.inc.php";
$dompdf = new DOMPDF();
$html ="
<table>
<tr >
<td class='abc'>testing table</td>
</tr>
<tr>
<td class='def'>Testng header</td>
</tr>
</table>";
$dompdf->load_html($html);
$dompdf->render();
$dompdf->set_base_path('localhost/exampls/style.css');
$dompdf->stream("hello.pdf");
?>
Run Code Online (Sandbox Code Playgroud)
请告诉我如何包含外部css文件..