0

我在尝试输出时收到 FPDF 错误

    require('cons.php');  
    $fpd = new fpdfx();
    $fpd->AddPage();
    $fpd->SetFont('Arial','B',16);
    $fpd->Cell(40,10,'Hello World!');
    $fpd->Output();

我在 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");

电子邮件类具有电子邮件功能和一些电子邮件功能

这是我的电子邮件课程详细信息

                require("fpdf/fpdf.php");
                class fpdfx extends FPDF
                {

                }


                class Email_class
                {
                }

当我试图获得一些输出时,它的节目

FPDF 错误:一些数据已经输出,无法发送 PDF 文件

4

1 回答 1

1

Try to comment out the $fpd->Output(); and see if you got any notice or other data sent sent to the output.

If not, dig into the Output() method and use die(); until you find what puts some data out!

于 2013-09-19T11:51:19.590 回答