0
我想要顯示一個URL的qrcode。我嘗試這個但是dind't工作,我想我的代碼不保存在我的電腦上的網址,他失敗,他就去嘗試打開QR碼Zend_pdf,顯示一個URL(qrcode)
$imageUrl = 'https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=toto';
$imagePath = sys_get_temp_dir() . '\\' . basename($imageUrl);
file_put_contents($imagePath, file_get_contents($imageUrl));
$image = Zend_Pdf_Image::imageWithPath($imagePath);
unlink($imagePath);
$page = $this->newPage($settings);
$page->drawImage($image, 0, 842 - 153, 244, 842);
感謝
請在描述問題時更具體,以增加獲得幫助的機會。單純的「沒有工作」不是很具描述性。 – Havelock
你是否檢查過你的'temp_dir'來查看它是否有內容? – Havelock