PHPExcel和TCPDF错误(PHPExcel and TCPDF ERROR)

编程入门 行业动态 更新时间:2024-10-25 00:30:01
PHPExcel和TCPDF错误(PHPExcel and TCPDF ERROR)

我试图从Excel生成PDF,但我收到以下错误:

TCPDF ERROR: [Image] Unable to get image:./var/www/projects/.../0401b0ca555959f391752bb1b0ea9ba1.jpg

看看Excel,我可以找到/var/www/projects/.../0401b0ca555959f391752bb1b0ea9ba1.jpg ,但没有. 在它之前。 点可以成为转换失败的原因吗?

I am trying to generate PDF from Excel, but I get the following error:

TCPDF ERROR: [Image] Unable to get image:./var/www/projects/.../0401b0ca555959f391752bb1b0ea9ba1.jpg

Looking though Excel, I can find /var/www/projects/.../0401b0ca555959f391752bb1b0ea9ba1.jpg, but without the . before it. Can the dot be a reason that failed converting?

最满意答案

./var/www/projects/.../0401b0ca555959f391752bb1b0ea9ba1.jpg

'。' 在此之前意味着它将在当前目录中查找名为var的文件夹。

你需要删除它。 为了从根开始。 哪个是对的。

它应该是这样的'/var/www/projects/.../0401b0ca555959f391752bb1b0ea9ba1.jpg'

看起来您正在尝试使用cURL来获取图像,因此我建议您尝试将图像更改为URL,例如http://URL of project folder/../0401b0ca555959f391752bb1b0ea9ba1.jpg

除了这个建议之外很难知道发生了什么,但我怀疑TCPDF并没有很好地发挥作用。

./var/www/projects/.../0401b0ca555959f391752bb1b0ea9ba1.jpg

The '.' before that means that it will be looking in current directory for a folder called var.

You will need to remove this . in order to begin at the root. Which is correct.

This is how it should look '/var/www/projects/.../0401b0ca555959f391752bb1b0ea9ba1.jpg'

It looks like you are trying to use cURL to get the image, so i suggest you should try and change the image to be a URL such as http://URL of project folder/../0401b0ca555959f391752bb1b0ea9ba1.jpg

Other than that suggestion its hard to know what is happeneing but i suspect the TCPDF is not playing nicely.

更多推荐

本文发布于:2023-08-07 05:35:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1462620.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   PHPExcel   TCPDF   ERROR

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!