TCPDF错误:[图像]无法获取图像 [英] TCPDF ERROR: [Image] Unable to get image
问题描述
我正在将 TCPDF 与Drupal的 print 模块结合使用,以生成文章的PDF,当我单击链接以生成PDF时最终显示以下错误消息:
I'm using TCPDF with Drupal's print module to generate PDF of articles, & ending up with following error message when I click the link to generate PDF:
TCPDF ERROR: [Image] Unable to get image: http://localhost/pathToDrupal/themes/bartik/logo.png
图像存在于指定的位置. 我尝试申请:
The Image exists in the location specified. I tried applying:
allow_url_fopen = On;
allow_url_include = On;
,但这不能解决问题. in 请谨慎帮助:( 显然,TCPDF不使用"fopen"包装器. Apparently the "fopen"-wrappers are not used by TCPDF. 如果提供图像的URL,则TCPDF会尝试使用cURL将其下载到存储TCPDF安装的缓存"目录中(您必须检查 If you supply the URL of an image, TCPDF tries to download it with cURL into the "cache"-directory where your TCPDF-installation is stored (you have to check what the 因此,我想您必须在此目录中具有写权限,魔术才能起作用.另外,您需要启用cURL. So I guess you have to have write permissions in this directory that the magic works. Also you need cURL enabled. 这篇关于TCPDF错误:[图像]无法获取图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!php.ini
but that could not resolve the problem. 推荐答案
K_PATH_CACHE
-constant是否包含内容). . K_PATH_CACHE
-constant contains to be sure).