使用mpdf html转pdf 报错。

需求:将html文件转为pdf文件。
 
已经参考了 html2pdf 不影响html样式demo
 
在使用mpdf类时,出现了以下错误,怎么解决:
 

Warning: file_put_contents(/htdocs/html2pdf/mpdf60/ttfontdata/dejavusanscondensed.GSUBGPOStables.dat): failed to open stream: Permission denied in /htdocs/html2pdf/mpdf60/classes/ttfontsuni.php on line 1145

Warning: file_put_contents(/htdocs/html2pdf/mpdf60/ttfontdata/dejavusanscondensed.GDEFdata.php): failed to open stream: Permission denied in /htdocs/html2pdf/mpdf60/classes/ttfontsuni.php on line 1163

Warning: file_put_contents(/htdocs/html2pdf/mpdf60/ttfontdata/dejavusanscondensed.GSUBdata.php): failed to open stream: Permission denied in /htdocs/html2pdf/mpdf60/classes/ttfontsuni.php on line 1395

Warning: file_put_contents(/htdocs/html2pdf/mpdf60/ttfontdata/dejavusanscondensed.GSUB.arab.DFLT.php): failed to open stream: Permission denied in /htdocs/html2pdf/mpdf60/classes/ttfontsuni.php on line 2195

Warning: file_put_contents(/htdocs/html2pdf/mpdf60/ttfontdata/dejavusanscondensed.GSUB.arab.KUR .php): failed to open stream: Permission denied in /htdocs/html2pdf/mpdf60/classes/ttfontsuni.php on line 2195

Warning: file_put_contents(/htdocs/html2pdf/mpdf60/ttfontdata/dejavusanscondensed.GSUB.arab.SND .php): failed to open stream: Permission denied in /htdocs/html2pdf/mpdf60/classes/ttfontsuni.php on line 2195

Warning: file_put_contents(/htdocs/html2pdf/mpdf60/ttfontdata/dejavusanscondensed.GSUB.arab.URD .php): failed to open stream: Permission denied in /htdocs/html2pdf/mpdf60/classes/ttfontsuni.php on line 2195

Warning: file_put_contents(/htdocs/html2pdf/mpdf60/ttfontdata/dejavusanscondensed.GSUB.nko .DFLT.php): failed to open stream: Permission denied in /htdocs/html2pdf/mpdf60/classes/ttfontsuni.php on line 2195

Warning: file_put_contents(/htdocs/html2pdf/mpdf60/ttfontdata/dejavusanscondensed.GPOSdata.php): failed to open stream: Permission denied in /htdocs/html2pdf/mpdf60/classes/ttfontsuni.php on line 3256

Warning: file_put_contents(/htdocs/html2pdf/mpdf60/ttfontdata/dejavusanscondensedB.GSUBGPOStables.dat): failed to open stream: Permission denied in /htdocs/html2pdf/mpdf60/classes/ttfontsuni.php on line 1145

Warning: file_put_contents(/htdocs/html2pdf/mpdf60/ttfontdata/dejavusanscondensedB.GDEFdata.php): failed to open stream: Permission denied in /htdocs/html2pdf/mpdf60/classes/ttfontsuni.php on line 1163

Warning: file_put_contents(/htdocs/html2pdf/mpdf60/ttfontdata/dejavusanscondensedB.GSUBdata.php): failed to open stream: Permission denied in /htdocs/html2pdf/mpdf60/classes/ttfontsuni.php on line 1395

Warning: file_put_contents(/htdocs/html2pdf/mpdf60/ttfontdata/dejavusanscondensedB.GSUB.arab.DFLT.php): failed to open stream: Permission denied in /htdocs/html2pdf/mpdf60/classes/ttfontsuni.php on line 2195

Warning: file_put_contents(/htdocs/html2pdf/mpdf60/ttfontdata/dejavusanscondensedB.GSUB.arab.KUR .php): failed to open stream: Permission denied in /htdocs/html2pdf/mpdf60/classes/ttfontsuni.php on line 2195

Warning: file_put_contents(/htdocs/html2pdf/mpdf60/ttfontdata/dejavusanscondensedB.GSUB.arab.SND .php): failed to open stream: Permission denied in /htdocs/html2pdf/mpdf60/classes/ttfontsuni.php on line 2195

Warning: file_put_contents(/htdocs/html2pdf/mpdf60/ttfontdata/dejavusanscondensedB.GSUB.arab.URD .php): failed to open stream: Permission denied in /htdocs/html2pdf/mpdf60/classes/ttfontsuni.php on line 2195

Warning: file_put_contents(/htdocs/html2pdf/mpdf60/ttfontdata/dejavusanscondensedB.GSUB.nko .DFLT.php): failed to open stream: Permission denied in /htdocs/html2pdf/mpdf60/classes/ttfontsuni.php on line 2195

Warning: file_put_contents(/htdocs/html2pdf/mpdf60/ttfontdata/dejavusanscondensedB.GPOSdata.php): failed to open stream: Permission denied in /htdocs/html2pdf/mpdf60/classes/ttfontsuni.php on line 3256

Warning: include(/htdocs/html2pdf/mpdf60/ttfontdata/dejavusanscondensedB.GDEFdata.php): failed to open stream: No such file or directory in /htdocs/html2pdf/mpdf60/classes/otl.php on line 72

Warning: include(): Failed opening '/htdocs/html2pdf/mpdf60/ttfontdata/dejavusanscondensedB.GDEFdata.php' for inclusion (include_path='.:') in /htdocs/html2pdf/mpdf60/classes/otl.php on line 72

Warning: file_get_contents(/htdocs/html2pdf/mpdf60/ttfontdata/dejavusanscondensedB.GSUBGPOStables.dat): failed to open stream: No such file or directory in /htdocs/html2pdf/mpdf60/classes/otl.php on line 235
Can't open file /htdocs/html2pdf/mpdf60/ttfontdata/dejavusanscondensedB.GSUBGPOStables.dat
已邀请:

张三俗

赞同来自:

 
ttfontdata ttfonts 这两个文件夹需要可写的权限,README.txt 有声明。

要回复问题请先登录注册