Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
WriteHtml Can';在mpdf中无法正常工作在php mvc中发送带有附件的邮件?_Php_Ajax_Model View Controller_Mpdf - Fatal编程技术网

WriteHtml Can';在mpdf中无法正常工作在php mvc中发送带有附件的邮件?

WriteHtml Can';在mpdf中无法正常工作在php mvc中发送带有附件的邮件?,php,ajax,model-view-controller,mpdf,Php,Ajax,Model View Controller,Mpdf,我试图从mpdf库的html中生成pdf,并发送带有pdf文件附件的邮件,但我做不到。WriteHtml无法响应 Headers no-store no-chach type:html/text $mpdf = $StockModel->getPdfObj(); $mpdf->allow_charset_conversion = true; $mpdf->charset_in = 'ISO-8859-2'; //$mpdf->allow_html_optio

我试图从mpdf库的html中生成pdf,并发送带有pdf文件附件的邮件,但我做不到。WriteHtml无法响应

Headers no-store no-chach type:html/text
$mpdf = $StockModel->getPdfObj();
$mpdf->allow_charset_conversion = true;
$mpdf->charset_in = 'ISO-8859-2';       
//$mpdf->allow_html_optional_endtags = true;
//$mpdf->restoreBlockPageBreaks = true; 
$mpdf->useOnlyCoreFonts = true;   
//$mpdf->SetProtection(array('print')); 
$mpdf->SetHeader('|'.$stype.'|Date '.date("d-M-Y").' ');
$mpdf->SetFooter('www.angellogistic.in');
$mpdf->defaultheaderfontsize=7;
$mpdf->defaultheaderfontstyle='B';
$mpdf->defaultheaderline=0;
$mpdf->defaultfooterfontsize=7;
$mpdf->defaultfooterfontstyle='BI';
$mpdf->defaultfooterline=0;
$mpdf->SetTitle("angel logistic");
$mpdf->SetAuthor("angel logistic");
$mpdf->SetWatermarkText("angel logistic");
$mpdf->showWatermarkText = true;
$mpdf->watermark_font = 'DejaVuSansCondensed';
$mpdf->watermarkTextAlpha = 0.1;
$mpdf->SetDisplayMode('fullpage');
$mpdf->WriteHTML(utf8_encode($html));
WriteHtml给出响应:

Headers no-store no-chach type:html/text
$mpdf = $StockModel->getPdfObj();
$mpdf->allow_charset_conversion = true;
$mpdf->charset_in = 'ISO-8859-2';       
//$mpdf->allow_html_optional_endtags = true;
//$mpdf->restoreBlockPageBreaks = true; 
$mpdf->useOnlyCoreFonts = true;   
//$mpdf->SetProtection(array('print')); 
$mpdf->SetHeader('|'.$stype.'|Date '.date("d-M-Y").' ');
$mpdf->SetFooter('www.angellogistic.in');
$mpdf->defaultheaderfontsize=7;
$mpdf->defaultheaderfontstyle='B';
$mpdf->defaultheaderline=0;
$mpdf->defaultfooterfontsize=7;
$mpdf->defaultfooterfontstyle='BI';
$mpdf->defaultfooterline=0;
$mpdf->SetTitle("angel logistic");
$mpdf->SetAuthor("angel logistic");
$mpdf->SetWatermarkText("angel logistic");
$mpdf->showWatermarkText = true;
$mpdf->watermark_font = 'DejaVuSansCondensed';
$mpdf->watermarkTextAlpha = 0.1;
$mpdf->SetDisplayMode('fullpage');
$mpdf->WriteHTML(utf8_encode($html));

在html中指定html和内联css代码和标记

为什么要将输入字符集设置为ISO-8859-2,然后将html编码为UTF8?确切的输出是什么?日志中有错误吗?设置
$mpdf->debug=true时会发生什么?为什么要将输入字符集设置为ISO-8859-2,然后将html编码为UTF8?确切的输出是什么?日志中有错误吗?设置
$mpdf->debug=true时会发生什么
Headers no-store no-chach type:html/text
$mpdf = $StockModel->getPdfObj();
$mpdf->allow_charset_conversion = true;
$mpdf->charset_in = 'ISO-8859-2';       
//$mpdf->allow_html_optional_endtags = true;
//$mpdf->restoreBlockPageBreaks = true; 
$mpdf->useOnlyCoreFonts = true;   
//$mpdf->SetProtection(array('print')); 
$mpdf->SetHeader('|'.$stype.'|Date '.date("d-M-Y").' ');
$mpdf->SetFooter('www.angellogistic.in');
$mpdf->defaultheaderfontsize=7;
$mpdf->defaultheaderfontstyle='B';
$mpdf->defaultheaderline=0;
$mpdf->defaultfooterfontsize=7;
$mpdf->defaultfooterfontstyle='BI';
$mpdf->defaultfooterline=0;
$mpdf->SetTitle("angel logistic");
$mpdf->SetAuthor("angel logistic");
$mpdf->SetWatermarkText("angel logistic");
$mpdf->showWatermarkText = true;
$mpdf->watermark_font = 'DejaVuSansCondensed';
$mpdf->watermarkTextAlpha = 0.1;
$mpdf->SetDisplayMode('fullpage');
$mpdf->WriteHTML(utf8_encode($html));