使用FPDF和FPDI [英] using FPDF and FPDI

查看:146
本文介绍了使用FPDF和FPDI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站的根是"/var/www/PDFBuilder".我有2个文件夹"fpdf17"和"fpdi142",并且在"fpdf17"文件夹中解压缩了一个名为"fpdf_tpl.php"的文件.

the root of my website is "/var/www/PDFBuilder". I have 2 folders "fpdf17" and "fpdi142" and i've unzipper a file called "fpdf_tpl.php" in the "fpdf17" folder.

这是我的代码:

error_reporting(E_ALL);
ini_set('display_errors', '1');

define('FPDF_FONTPATH','/var/www/PDFBuilder/fpdf17/');

require('/var/www/PDFBuilder/fpdf17/fpdf.php');
include('/var/www/PDFBuilder/fpdi142/fpdi.php');

当我尝试打开我的网站时,这是我得到的输出:

When I try to open my website, this is the output I get:

警告:require_once(fpdf_tpl.php):无法打开流:否这样 第27行的/var/www/PDFBuilder/fpdi142/fpdi.php中的文件或目录 致命错误:require_once():无法打开所需的'fpdf_tpl.php' (include_path ='.:/usr/share/php:/usr/share/pear')在 /var/www/PDFBuilder/fpdi142/fpdi.php,第27行

Warning: require_once(fpdf_tpl.php): failed to open stream: No such file or directory in /var/www/PDFBuilder/fpdi142/fpdi.php on line 27 Fatal error: require_once(): Failed opening required 'fpdf_tpl.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/PDFBuilder/fpdi142/fpdi.php on line 27

我在做什么错了?

推荐答案

找到了解决方案.

您可以从 http://://www.setasign.de/support/manuals/fpdi/fpdi/

只需解压缩它,然后将其与fpdi放在同一文件夹中,就可以了.

Just extract it and put it in the same folder as the fpdi and you will be fine.

这篇关于使用FPDF和FPDI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆