fuelqr/fuel-qrcode
Composer 安装命令:
composer require fuelqr/fuel-qrcode
包简介
Export QR code
README 文档
README
QRCode library created as a FuelPHP package.
Usage
Load the QRCode package
// load the package \Package::load("qrcode");
Output the QR directly, used within a view (ugly)
echo \QRCode::png('http://arrggghhh.steadweb.co.uk');
or pass the generated QRCode to a view
try { $file = time() . ".png"; $qrcode = ""; // generate the QRCode \QRCode::png('http://arrggghhh.steadweb.co.uk', $file, QR_ECLEVEL_L, 6, 4, false); // check the file has been generated // otherwise throw an exception if( ! is_file(DOCROOT . $file)) { throw new Exception("Unable to generate QR code"); } $qrcode = Asset::img(Uri::create("/" . $file)) } catch(\Exception $e) { // log the error Log::error($e->getMessage()); // show something, atleast $qrcode = "QRCode wasn't generated, derp."; } return \View::forge("qrcode", array("qr" => $qrcode), false);
统计信息
- 总下载量: 2.1k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-07-22