php - How can I format a QR code output? -
i using piece of code create qr code (thanks lodder!!):
$data .= $codecontents[0]->nom; $data .= $codecontents[0]->cognoms; $data .= $codecontents[0]->ecorreu; $tempdir = jpath_site . '/images/'; $filename = 'qr_'.md5($data).'.png'; $pngabsolutefilepath = $tempdir.$filename; $urlrelativefilepath = juri::root() .'images/' . $filename; if (!file_exists($pngabsolutefilepath)) { qrcode::png($data, $pngabsolutefilepath); } echo '<img src="'.$urlrelativefilepath.'" />';
however, don't output when read phone, looks like
danivalverdedani.valverde@gmail.com
how can format looks like
name: dani valverde e-mail: dani.valverde@gmail.com
thank much!
dani
i think $data
should this:
$data = 'name: ' . $codecontents[0]->nom . ' ' . $codecontents[0]->cognoms . php_eol . 'email:' . $codecontents[0]->ecorreu;
then phone call qrcode::png($data, $pngabsolutefilepath);
php qr-code
No comments:
Post a Comment