I got it to display with text but when i pass it into
function getQRcode($qr){
include 'application/views/inc/qrcode.php';
$this->view->qrcode = QRcode::png($qr);
$this->view->render('user/qrcode');
}
It works fine but when this symbol '%' shows up in $qr variable it just wont work why is this ??
php qr code library: http://phpqrcode.sourceforge.net/
The code you're showing isn't particularly relevant as it doesn't show how you process the variable before you use it, nor the significant part(s) of the library.
At a guess you're passing in the value using GET/POST and aren't properly url-encoding the string. %
is used for special sequences eg %20
represents a space.
A list of characters that need to be encoded is available here.
Try replacing your %
with %25
.
For future reference, an online encoder/decoder can be found at http://meyerweb.com/eric/tools/dencoder/
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments