问题描述
我正在使用HTML2PDF,并且试图使图像显示出来,但我不断收到此错误:
I am using HTML2PDF and I am trying to make images appear but I keep on getting this error:
错误n°6文件:/var/www/vhosts/default-domain.com/httpdocs/html2pdf_v4.03/html2pdf.class.php线:1321
ERROR n°6File : /var/www/vhosts/default-domain.com/httpdocs/html2pdf_v4.03/html2pdf.class.phpLine : 1321
无法加载图片/student/questions 3rd/images/small1324538668数字行5.JPG
Impossible to load the image /student/questions 3rd/images/small1324538668Number Lines 5.JPG
有人可以帮我解决这个问题吗?我已经为此苦了一段时间了.
Can anybody please help me with this issue? I have been struggling with it for a while already.
这是我拥有的html代码.
This is the html code that I have.
<img src="/student/questions 3rd/images/small1324538668Number Lines 5.JPG" />
这是检查其工作原理的站点.
And here is the site to check to see how it works.
http://www.domain.com/html2pdf_v4.03/examples/Test.php
请帮助!
谢谢
推荐答案
使用HTML2PDF时,您必须以这种方式给出图像的完整路径
While using HTML2PDF yo have to give the full path of your image like in this manner
http://domain/path/to/image
或者您可以给学生/问题3rd/images/small1324538668Number Lines 5.JPG,因为任何脚本都在根目录下的index.php的基础上运行,因此您必须从根目录给出图像路径.
or you can give student/questions 3rd/images/small1324538668Number Lines 5.JPG because any script runs on base of index.php which is located in root so you have to give the image path from root location.
这篇关于HTML2PDF图像错误,无法加载图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!