更新时间:2023-09-19 10:35:10
这实际上与Zend Framework无关,但是你需要为DomPDF提供正确的路径来加载外部文件。
This has in fact nothing to do with Zend Framework, but you need to supply DomPDF the right path to load the "external" files from.
$dompdf = new DOMPDF();
$dompdf->set_base_path(realpath(APPLICATION_PATH . '/path/to/css/'));
$dompdf->load_html($html);
$dompdf->render();
另请参阅手动此功能的DomPDF。
See also the manual of DomPDF for this feature.