Not Passing encoded variable % to Controller |
I have to encode urls linking to my invoice pages.
on All invoice page: Code: <?php $pdfurl = urlencode(base64_encode($this->encrypt->encode($list->order_id))); www.website.com/pdf/13 to www.website.com/pdf/Z1FSMmNkcG9NWHNrc2V3MzZvY2grY0pzQUVtSEZRYTFrMmU0RTMreWFNa3MzS29tdXhJRzJBUnQwNGJhR1lwcEZLdjUvTTlLbnJ0YmNSQ2Q2RTlyekE9PQ%3D%3D My controller code is: in controller when $pdfurl is called it carries Z1FSMmNkcG9NWHNrc2V3MzZvY2grY0pzQUVtSEZRYTFrMmU0RTMreWFNa3MzS29tdXhJRzJBUnQwNGJhR1lwcEZLdjUvTTlLbnJ0YmNSQ2Q2RTlyekE9PQ== It drops %3D%3D and appends == at the end. This doesnot decodes to the original variable value which is 13. instead it decodes to : gQR2cdpoMXsksew36och+cJsAEmHFQa1k2e4E3+yaMks3KomuxIG2ARt04baGYppFKv5/M9KnrtbcRCd6E9rzA== Pls help, i am doing this for first time. Code: function pdf($pdfurl){ My Config file has: Code: $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-@\='; Route file: Code: $route['pdf/(:any)'] = 'Afterlogin_admin/pdf/$1'; |
Messages In This Thread |
Not Passing encoded variable % to Controller - by chetankchandak - 10-11-2020, 11:24 PM
RE: Not Passing encoded variable % to Controller - by includebeer - 10-16-2020, 04:56 AM
|