{"id":21912482,"url":"https://github.com/tianliangzhou/ffi-qrcode","last_synced_at":"2026-04-29T15:33:17.703Z","repository":{"id":110644998,"uuid":"379962310","full_name":"TianLiangZhou/ffi-qrcode","owner":"TianLiangZhou","description":"PHP二维码生成器","archived":false,"fork":false,"pushed_at":"2024-06-25T01:43:17.000Z","size":4763,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-27T08:43:27.202Z","etag":null,"topics":["php-ffi","php8","qrcode","qrcode-generator"],"latest_commit_sha":null,"homepage":"https://loocode.com/tool/qr-code-generator","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TianLiangZhou.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-24T14:59:07.000Z","updated_at":"2024-06-24T05:53:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"ca868e19-edb8-44a3-90db-4ace302898f5","html_url":"https://github.com/TianLiangZhou/ffi-qrcode","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TianLiangZhou%2Fffi-qrcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TianLiangZhou%2Fffi-qrcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TianLiangZhou%2Fffi-qrcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TianLiangZhou%2Fffi-qrcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TianLiangZhou","download_url":"https://codeload.github.com/TianLiangZhou/ffi-qrcode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244931251,"owners_count":20534003,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php-ffi","php8","qrcode","qrcode-generator"],"created_at":"2024-11-28T18:10:14.649Z","updated_at":"2026-04-29T15:33:12.685Z","avatar_url":"https://github.com/TianLiangZhou.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"## ffi-qrcode\n\n`ffi-qrcode`是一个快速将字符串生成二维码的`PHP FFI`库，支持多种生成方式。\n\n### 环境\n\n需要`php \u003e= 7.4` 以上的版本并且开启了`FFI`扩展。如果你需要自己编译库还需要装`rust` 工具链。\n\n还需要设置`php.ini` 中的`ffi.enable`为`On`。\n\n### Usage \n\n该库提供四种基础用法：不带音标，带音标，首字母，多音字带音标。\n\n```php\n\u003c?php\n\nuse FastFFI\\QrCode\\QrCode;\n\ninclude __DIR__ . '/../src/QrCode.php';\n\n\n$qr_code = QrCode::new(\"abc\");\n$qr_code\n    -\u003ewithDimension(8, 8)\n    -\u003ewithBgColor(\"#FF0000\")\n    -\u003ewithFgColor(\"#FF00FF\")\n    -\u003ewithLogo(__DIR__ . '/logo.png', false, true)\n    -\u003ewithFilename(__DIR__ . '/php_qrcode.png')\n    -\u003eimage();\n```\n\n以上程序执行后的结果: \n\n![php_qrcode](examples/php_qrcode.png)\n\n[在线生成](http://loocode.com/tool/qrcode/qr-code-generator)\n\n### FAQ\n\n- 在`centos`上执行失败?\n  \n  确定是不是`glibc`版本过低。可以使用`ldd lib/libffi_pinyin.so` 来查看库信息。\n如果出现`/lib64/libc.so.6: version 'glibc_2.18' not found`就说明你服务的`glibc`版本过低。 \n  下载glibc编译升级，下载地址: `wget http://mirrors.ustc.edu.cn/gnu/libc/glibc-2.18.tar.gz` \n  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftianliangzhou%2Fffi-qrcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftianliangzhou%2Fffi-qrcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftianliangzhou%2Fffi-qrcode/lists"}