我正在尝试让 dompdf 在内部服务器上运行。使用默认的 config.inc.php 设置,我在运行相当于演示“Hello Wolrd”脚本时得到以下信息:
Warning: require_once(/var/www/dompdf-master/lib/php-font-lib/classes/font.cls.php): failed to open stream: No such file or directory in /var/www/dompdf-master/dompdf_config.inc.php on line 335
Fatal error: require_once(): Failed opening required '/var/www/dompdf-master/lib/php-font-lib/classes/font.cls.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/dompdf-master/dompdf_config.inc.php on line 335
当我关闭时DOMPDF_ENABLE_AUTOLOAD
,我不再收到此警告,但代码失败并显示以下内容:
Fatal error: Class 'DOMPDF' not found in /var/www/rfq/test.php on line 115
以下是代码:
require_once("/var/www/dompdf-master/dompdf_config.inc.php");
$dompdf = new DOMPDF(); // this is the line that fails
$dompdf->load_html($quotehtml);
$dompdf->render();
$dompdf->stream("rfq".$_REQUEST['quoteid'].".pdf");
这是 Ubuntu 12.04,最新的补丁,具有默认的 Apache 设置。
非常感谢。