我当前正在将图像存储到数据库中,我可以使用以下代码将它们显示在网页上:
<?php
$type = "image/png"; //or the actual mime type of the file
$base64blob = base64_encode($portal['image']); //encode to base64
$datauri = "data:$type;base64,$base64blob";
?>
问题是我需要将其保存为临时文件,以便可以使用phpspreadsheet在以下代码中使用它,其中setpath行将是临时文件:
$drawing = new \PhpOffice\PhpSpreadsheet\Worksheet\Drawing();
$drawing->setName('Logo');
$drawing->setDescription('Logo');
$drawing->setPath('./images/officelogo.jpg');
$drawing->setHeight(36);
我是新手,有没有办法做到这一点,谢谢
答案 0 :(得分:1)
jdbc:mysql://pradera.cwob2oxhu1so.eu-central-1.rds.amazonaws.com