我正在使用一个基于URL参数生成PNG图像的脚本image_id.例如:http://www.example.com/image.php?image_id=G554jGTT
现在我想将该图像放在pdf中,如下所示:
$imagepath = "www.example.com/image.php?id=" . $id;
$image = Zend_Pdf_Image::imageWithPath($imagepath);
Run Code Online (Sandbox Code Playgroud)
当我使用本地文件一切顺利,但当我使用URL时,我收到以下错误:
Fatal error: Uncaught exception 'Zend_Pdf_Exception' with message 'Cannot create image resource. File not found.' in E:<...>\library\Zend\Pdf\Resource\ImageFactory.php:38
有人知道怎么做这个吗?
谢谢!