MDPF 库生成空白页..即使我设置调试模式也没有错误
我正在使用 mpdf 库,它在文件夹中单独工作完美服务器,但如果我在我的应用程序中包含 mpdf 库,那么它会输出一个空白页面。如果我通过 firebug 看到 HTML,那么
<html>
<head></head>
<body></body>
</html>
下面显示的是我的页面代码
session_start();
error_reporting(-1);
//include files and mpdf library
$id=(int)$_GET['id'];
//some mysql query and and
$html = "<div id=\"print_target_box\" style=\"display:block;\">";
// some php mysql manipulations
$html .="<b>..</b>
<strong>...</strong><br/>";
// many div and block concatenate by $html.="";
$html .="</div>";
$mpdf = new mPDF();
$mpdf->debug = true;
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
echo phpinfo();
在 zlib 部分返回
Directive Local Value Master Value
zlib.output_compression Off Off
zlib.output_compression_level -1 -1
zlib.output_handler no value no value
,依此类推...
我还阅读了此链接
i am using mpdf library, it works perfect individuall in an folder on server, but if i include mpdf library in my application, then it output a blank page. if i see the HTML via firebug then display
<html>
<head></head>
<body></body>
</html>
below is my page code
session_start();
error_reporting(-1);
//include files and mpdf library
$id=(int)$_GET['id'];
//some mysql query and and
$html = "<div id=\"print_target_box\" style=\"display:block;\">";
// some php mysql manipulations
$html .="<b>..</b>
<strong>...</strong><br/>";
// many div and block concatenate by $html.="";
$html .="</div>";
$mpdf = new mPDF();
$mpdf->debug = true;
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
echo phpinfo();
returns under zlib section
Directive Local Value Master Value
zlib.output_compression Off Off
zlib.output_compression_level -1 -1
zlib.output_handler no value no value
and so on...
i also read this link
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
服务器上缺少一张图像
`go.gif
,并且不会显示错误bcoz error_reporting 在下面包含的 php 页面中设置为
0
。如果您编辑文件 mpdf.php 并在以下位置找到包含该错误消息的行it:
将其更改为:
它可能会显示出了什么问题。
参考:
http://mpdf.bpm1.com/forum/comments.php?DiscussionID=235
one image
`go.gif
was missing on server and this does not displaying errorbcoz error_reporting was set to
0
in below included php page..If you edit file mpdf.php and find the line with that error message in it:
change this to:
it may show what is going wrong.
reference:
http://mpdf.bpm1.com/forum/comments.php?DiscussionID=235
就我而言,问题是缺少mbregex。生成错误的行是@command,这对于调试未知的东西来说非常有用。
In my case the problem was missing mbregex. Line that generates the error is @command, which is just fabulous for debugging unknown stuff.