FPDF错误:使用FPDF已经输出了一些数据 [英] FPDF error: Some data has already been output by using FPDF
本文介绍了FPDF错误:使用FPDF已经输出了一些数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尝试OutPut时出现FPDF错误
I am getting FPDF Error while trying to OutPut
require('cons.php');
$fpd = new fpdfx();
$fpd->AddPage();
$fpd->SetFont('Arial','B',16);
$fpd->Cell(40,10,'Hello World!');
$fpd->Output();
并且在cons.php中我只有很少的代码
and i have few codes in cons.php
error_reporting(E_ERROR | E_PARSE); //For Error Reporting
session_start();
setlocale(LC_MONETARY, 'da_DK');
set_time_limit(0);
define("DBHOST","XXX");
define("DBNAME","XXX");
define("DBUSER","XXX");
define("DBPASS","XXX");
define("TODAYSDATE",date('d-m-Y', strtotime("+4 months")));
define("UPDATEDATE",date('d-m-Y', strtotime("+5 months")));
define("LanguageFilesURL",'XXX');
global $instance;
require("inc/Email-class.php");
require("inc/database_class.php");
电子邮件类具有电子邮件功能和某些电子邮件功能
email class have email functionality with some email functions
这是我的电子邮件班级详细信息
here is my Email Class details
require("fpdf/fpdf.php");
class fpdfx extends FPDF
{
}
class Email_class
{
}
当我试图获得一些演出时的表演
when i am trying to get some output its shows
FPDF错误:已经输出了一些数据,无法发送PDF文件
推荐答案
尝试注释掉$ fpd-> Output();并查看是否有任何通知或其他发送到输出的数据.
Try to comment out the $fpd->Output(); and see if you got any notice or other data sent sent to the output.
如果没有,请深入到Output()方法并使用die();直到找到什么数据出来!
If not, dig into the Output() method and use die(); until you find what puts some data out!
这篇关于FPDF错误:使用FPDF已经输出了一些数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文