📜  用 laravel 生成的 pdf 显示图片 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:12.630000             🧑  作者: Mango

代码示例1
//in Controller    
        $path = 'images/V.png';
        $type = pathinfo($path, PATHINFO_EXTENSION);
        $data = file_get_contents($path);
        $logo = 'data:image/' . $type . ';base64,' . base64_encode($data);
  //in View