"PHP" PHP generates barcodes

Source: Internet
Author: User

1. What is a barcode?

Baidu Encyclopedia definition: bar code (barcode) is the width of a number of black bars and blank, according to a certain coding rules, to express a set of information graphic identifier. A common barcode is a pattern of parallel lines of black strips (short strips) and white bars (short ones) that vary greatly in reflectivity. In daily life, bar code can be marked out of the goods producing countries, manufacturers, product names, production dates, book classification number, mail location, the type, date and many other information. Please refer to the Barcode encoding format for details

Printed coupons, merchants need to use the authenticator to read the barcode, to obtain its validity.

2. How do I generate barcodes?

  First find strong open source materials, download the latest version of Barcodegen on barcode website. Unzip to your root directory

: Http://www.barcodebakery.com/en/download

3 Use

(1) Class folders are classes that have been packaged to generate barcodes, and only need to be called.

(2) index.php is an optional condition to generate barcode function, is the main program entrance, and the HTML folder is provided by the referenced code, code39.php refers to the default encoding format.

<? PHP Header (' location:html/code39.php ');? >

When the http://127.0.0.1/barcodegen/index.php is accessed directly, the user can experience the function, select any item and generate the corresponding barcode. You can use it as a module if you need to.

(3) test_1d.php is another example of generating a hello barcode directly from the code.

When accessing http://127.0.0.1/barcodegen/test_1D.php, HELLO. PNG image generation

Access test_1d.html to see barcode pictures directly

4 Verification

Generated barcode picture. Save them. Go to the official website to verify if it is correct

Verify Address: http://www.onlinebarcodereader.com/

"PHP" PHP generates barcodes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.