-1
我想知道是否有可能從這樣的鏈接添加圖像從一個PHP發電機? parse/BarGen/generator.php?text=760000322300000939115260
PhpExcel - 從PHP生成器添加圖像?
$gdImage = imagecreatefromjpeg('uploads/simple.jpg');
// Add a drawing to the worksheetecho date('H:i:s') . " Add a drawing to the worksheet\n";
$objDrawing = new PHPExcel_Worksheet_MemoryDrawing();
$objDrawing->setName('Sample image');
$objDrawing->setDescription('Sample image');
$objDrawing->setImageResource($gdImage);
$objDrawing->setRenderingFunction(PHPExcel_Worksheet_MemoryDrawing::RENDERING_JPEG);
$objDrawing->setMimeType(PHPExcel_Worksheet_MemoryDrawing::MIMETYPE_DEFAULT);
$objDrawing->setHeight(150);
$objDrawing->setCoordinates('C1');
$objDrawing->setWorksheet($objPHPExcel->getActiveSheet());
來源:https://phpexcel.codeplex.com/
你嘗試了嗎?是**大膽**;) – 2014-11-03 18:11:26
我做到了,但如此$ gdImage = imagecreatefromjpeg(),我跟着一些例子。 – Kavvson 2014-11-03 18:12:15
你有沒有得到任何錯誤? – 2014-11-03 18:23:57