Download the PHP package oss_dog/phpqrcode without Composer

On this page you can find all versions of the php package oss_dog/phpqrcode. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package phpqrcode

文档

写在前面

  1. 安装命令composer require doing/phpqrcode 版本号 ,例 composer require doing/phpqrcode 1.*(如果安装不是最新或者没找到包可能是中国镜像有延迟)
  2. 此包可以集成任何框架:所以PHP都能集成(本包作者在ThinkPHP5中编写,故在此框架下集成可能会有更好的体验)
  3. 此包依赖于phpqrcode在此感谢为此奉献的作者们
  4. packagist地址
  5. github地址欢迎Star

简单调用示例

注:不会自动创建文件夹(存放二维码的)如果文件夹不存在会报错,以下为例就得先创建文件夹uploads

上述中 png方法一共7个参数(建议只填$text,$outfile)

在传递以下参数时一定注意顺序和默认值

  1. $text是二维码的内容;
  2. $outfile导出文件的路径和文件名称:后缀一定是png,测试时建议不要路径只要文件名如:2222.png,生成了图片后去盘符搜索此文件在哪个文件夹里面,然后根据此文件的路径设计$outfile的路径。
  3. $size图片大小默认是6建议不用传:可根据业务需求调整:数字越大图片越大
  4. $color二维码样式:默认是黑色16进制#000,建议不要修改
  5. $level是容错率模式是最高:强烈建议不修改
  6. $margin=2二维码外面的白边距离越大留白越大,强烈建议不修改
  7. $saveandprint是否打印强烈建议不修改

给二维码加头像或者logo

VCARD名片信息二维码

$content = 'BEGIN:VCARD' . "\n";
$content .= 'VERSION:2.1' . "\n";
$content .= 'N:张' . "\n";
$content .= 'FN:三' . "\n";
$content .= 'TEL;WORK;VOICE:18780808080' . "\n";
$content .= 'ORG:公司:xxx科技有限公司'. "\n";
$content .= 'END:VCARD' . "\n";
$file = 'zs.png';
//调用方法成功后,会在相应文件夹下生成二维码文件
 QRcode::png($content, $file);

 当扫码此二维码时,点击保存联系人就会把联系人的姓+名 电话 公司信息等保存在联系人里面
 请求参数$content的编写规则可去百度搜索vcard参数

All versions of phpqrcode with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package oss_dog/phpqrcode contains the following files

Loading the files please wait ....