html:
<img src="{eq name='v.miniqrcode' value=""}{:url('makeMiniQrcode_do')}?id={$v.id}{else/}{$v.miniqrcode}{/eq}" style="width:100%;"> // 接口地址寫在src屬性中
PHP:
header('Content-type:image/png'); echo file_get_contents(ROOT_PATH . $filepath);
1