TCPDF Save file to folder?

后端 未结 11 2100
耶瑟儿~
耶瑟儿~ 2020-12-13 07:05

I\'m using TCPDF to print a receipt and then send it to customer with phpMailer, but I have a problem:

I have no idea how to save the file into a pdf.

11条回答
  •  醉话见心
    2020-12-13 07:37

    $pdf->Output( "myfile.pdf", "F");
    

    TCPDF ERROR: Unable to create output file: myfile.pdf

    In the include/tcpdf_static.php file about 2435 line in the static function fopenLocal if I delete the complete 'if statement' it works fine.

    public static function fopenLocal($filename, $mode) {
        /*if (strpos($filename, '://') === false) {
            $filename = 'file://'.$filename;
        } elseif (strpos($filename, 'file://') !== 0) {
            return false;
        }*/
        return fopen($filename, $mode);
    }
    

提交回复
热议问题