【发布时间】:2013-06-15 11:53:20
【问题描述】:
我在尝试通过 composer 加载 dompdf lib 时遇到了一个非常烦人的错误。
致命错误:require_once():需要打开失败 'dompdf_config.inc.php' (include_path='.:/usr/local/Cellar/php54/5.4.15/lib/php')
我可以告诉我我的 php 配置确实加载了 DOM 扩展
这是测试代码
require 'vendor/autoload.php';
require_once("dompdf_config.inc.php");
$html =
'<html><body>'.
'<p>Hello World!</p>'.
'</body></html>';
$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->render();
$dompdf->stream("hello_world.pdf");
我通过 composer 安装了 dompdf:
我错过了什么?
【问题讨论】:
-
您是否按照github.com/dompdf/dompdf 中的描述安装了它?
-
您的代码是否基于instructions from the wiki?
标签: php composer-php dompdf