【发布时间】:2020-03-05 21:17:05
【问题描述】:
在 drupal 7 中使用 tcpdf 生成 pdf 文件时出现以下错误。
Notice: tempnam(): file created in the system's temporary directory in TCPDF_STATIC::getObjFilename() (line 296 of /var/www/html/sites/all/libraries/tcpdf/include/tcpdf_static.php).
当我们注释下面的代码时,这个错误就会消失
$path = 'sites/default/files/'.$user->mail.'/'.$sign_file;
$tcpdf->Image($path,145, 102.75, 40, 15, $sign_filetype , '', '', true, 150, '', false, false, 1, false, false, false);
这个文件的文件权限是
-rw-rw---- 1 apache apache 5917 Mar 4 23:10 sign.png
版本详情为 TCPDF 模块 - 7.x-1.0-beta1 和 php 7.2.27。提前感谢您提供解决此问题的任何建议。
【问题讨论】:
-
根据this user comment,这似乎不是错误,实际上是一个功能