【发布时间】:2015-07-25 15:37:06
【问题描述】:
【问题讨论】:
-
它尝试使用 http:// 下载图像,您可以使用 str_replace , strtr 删除 img src 标签(http 链接),但是您是否阅读了手册,也许有跳过下载图像的选项
【问题讨论】:
我设法更改了 mpdf.php 中的检查,它检查 allow_url_fopen 是否为 Off,如果是则不使用 cURL。我将代码从
if ((!$data || !$type) && !ini_get('allow_url_fopen') && function_exists("curl_init")) {
$this->file_get_contents_by_curl($file, $data); // needs full url?? even on local (never needed for local)
if ($data) { $type = $this->_imageTypeFromString($data); }
}
到
if ((!$data || !$type) && ini_get('allow_url_fopen') && function_exists("curl_init")) {
$this->file_get_contents_by_curl($file, $data); // needs full url?? even on local (never needed for local)
if ($data) { $type = $this->_imageTypeFromString($data); }
}
【讨论】: