Help report dompdf version 0.7.0

0

I am generating a report in pdf with dompdf, it works perfectly, it is the following, how can I do that when the image field of the recordset is empty I show an alternative image, for example without image.gif and not I see the box Image not found or type unknown

    
asked by konchikuzo 05.12.2017 в 12:11
source

1 answer

0

you could try with "file_exist" ... this fragment is how I use it for a project that I am currently building ...

$url = "http://localhost/PHPizza/imagenes/sabores/";
$imagen= "muzzarella.png"; // como ejemplo

if (file_exists($url.$imagen)) {
    echo $url . $imagen;
} else {
    echo $url . 'no_imagen.png';
}

www.php.net/manual/en/function.file-exists.php

    
answered by 05.12.2017 в 12:23