为什么 fpdf 库无法在生产服务器上工作?

发布于 2024-09-08 02:21:32 字数 142 浏览 2 评论 0原文

我使用fpdf库将pdf从我的php页面导出到本地主机中的“pdf”。在我的本地主机上,页面导出为pdf,但是当我托管到生产服务器并实时工作时... 数据未导出为 pdf 为什么直播时不导出 实际上我也看不到任何错误,,,,,但我的页面变成空白

I am export pdf from my php page to 'pdf' in my localhost by using fpdf library.On my localhost the page is exported to pdf but when i host to the production server and work live ...
The datas are not being exported to pdf
Why it is not exported on live
Actually i cant see any error also,,,,, but my page goes blank

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

倾`听者〃 2024-09-15 02:21:33

尝试添加以下内容以查看错误:

ini_set('display_startup_errors',1);
ini_set('display_errors',1);
error_reporting(-1);

检查错误后,我通过在代码顶部添加以下内容来使代码正常工作:

include_once('fpdf182/fpdf.php');
ob_start();

Try adding following to view errors:

ini_set('display_startup_errors',1);
ini_set('display_errors',1);
error_reporting(-1);

after reviewing the errors, i got my code to working by adding this on top of code:

include_once('fpdf182/fpdf.php');
ob_start();
清风不识月 2024-09-15 02:21:32

使用

ini_set('display_errors', 1);

您还可以尝试在脚本开头

You can also try to use

ini_set('display_errors', 1);

in the beginning of your script

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文