查看二维码图片
/**
* 查看二维码图片
* @param $code
*/
function img($code){
$this->load->library('QRCode');
$url = 'http://'.$code;
QRCode::png($url, FALSE, QR_ECLEVEL_L, 8);
}
处理图片
echo file_get_contents("/tmp/404_03.png");
$str = base64_encode(file_get_contents("/tmp/404_03.png"));
echo "<img src='data:image/png;base64,{$str}'>";