Hi,
I have a problem with inserting image streams into my docx when using url get parameter.
The following with direct url to image file is working correctly:
$docx = new CreateDocx();
$html = '<img src="https://www.mydomain.com/images/test.png">';
$docx->embedHTML($html);
Also this block with referencing a php file is working fine:
$docx = new CreateDocx();
$html = '<img src="https://www.mydomain.com/image.php">';
$docx->embedHTML($html);
In my test example the content of my image.php is:
<?php
echo file_get_contents('/images/test.png');
But now my problem comes with this code:
$docx = new CreateDocx();
$html = '<img src="https://www.mydomain.com/image.php?id=123">'; // adding ?id=123
$docx->embedHTML($html);
My image.php is not changed and should output my test image.
I've only added the get parameter id=123 to the url and with this change, the image is no longer shown in the document. Instead there is only a border with a red cross in the upper left corner and an error message saying that the image can't be displayed.
?????? Any suggestions?