Forum


Replies: 9   Views: 4513
Cannot find image
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by jc.021286  · 10-09-2014 - 22:36

I seem to be having issues with finding images. If I use the absolute path, i cannot get the image. Though if I use a relative path '../../img/example.jpg' I can find it. I am not sure if this is related to the following issue. However, when I try to source an image from a dynamic script: "http://www.officedocumentconsulting.com/main_php/upload_images_display.php?instance=0123456789b&floor=557&state=0.jpg" it cannot find it. Is it because the image is displayed through PHP as it is calling it from a database. Navigating to the URL in the browser pulls up the image just fine. Using the relative path which resolved the absolute image reference that resolved the earlier issue, does not work in this instance. This did work however when using the function with the now depreciated: $docx->addTemplateVariable('IMAGE_'.$i, $PHP_SCRIPT_TO_IMAGE, 'image', '440', '440');