我正在使用TCPDF并从MySQL表格行获取内容,其中包含HTML:
<p>Internet users are our primary target market. We do not charge the consumer any fee
for using our services or to make purchases online. We do not add any fee or commission on products that you compare and purchase online</p>
<p><img src="http://1/2/3/x.jpg" width="x" height="x"></p>
答案 0 :(得分:0)
在Tcpdf中确保您的路径是相对路径而不是http路径 EX
realpath(APPPATH."../1/2/3/x.jpg")
答案 1 :(得分:0)
TCPDF不支持绝对路径。你必须使用相对路径。
在realpath
PHP
功能
要查看其他内容,请从脚本中读取对图像的访问权限。你必须将权限chmod设置为777或755到包含文件夹的图像。
答案 2 :(得分:0)
请尝试使用div&gt;图片或表&gt;&gt; tr> td&gt;图像一些其他标签而不是p>图片 (包含图片标签)
答案 3 :(得分:0)
通过给出图像的相对路径而不是给出绝对路径看下面的代码。我认为它应该是有用的。
<img src="<?php echo 'layouts/images/'.$decscript ?>"/>