0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

今更 PHP PEAR を使ったQRコード生成

Posted at

下記プログラムにて生成。
qrcnv.php

<?php
require_once("Image/QRCode.php"); 

$qr = new Image_QRCode();

$iamge=$qr->makeCode('http://example.com');

?>

下記QRcode表示処理。
qrdisp.php

<?php

<img src="./qrcnv.php">

?>

ブラウザにて確認。
qrcnv_test.png
ここで問題があります。 PEARはすでに終わっているライブラリー何とか使える PHP7.3までしか使えません。
また、 Ubuntu 20.04では/usr/share/php/OS/Guess.phpにエラーが出ました。
split() ereg_replace()が PHP7では不可なのでexplode,preg_replaceに変更してインストール出来ました。

pear install Image_QRCode-0.1.3
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?