利用php產生二維碼,非常實用

來源:互聯網
上載者:User
大家經常見到條碼和二維碼,特別是智能手機時代這些碼更顯得活躍了,今天就為大家分享一下如何使用php產生條碼,至於如何產生二維碼,一般常用的試調用google的開放api來產生,言歸正傳,直接上代碼了:

=45 && $x<50) || ($x >=85)) { $sh=10; } else { $sh=0; }     if ($bars[$x] == '1') { $color = $fg; } else { $color = $bg; }     ImageFilledRectangle($img, ($x*$lw)+15,5,($x+1)*$lw+14,$hi+5+$sh,$color);   }   /* Add the Human Readable Label */   ImageString($img,4,5,$hi-5,$code[0],$fg);   for ($x=0;$x<5;$x++) {     ImageString($img,5,$lw*(13+$x*6)+15,$hi+5,$code[$x+1],$fg);     ImageString($img,5,$lw*(53+$x*6)+15,$hi+5,$code[$x+6],$fg);   }   ImageString($img,4,$lw*95+17,$hi-5,$code[11],$fg);   /* Output the Header and Content. */   header("Content-Type: image/png");   ImagePNG($img); } ?>
  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.