Home >Backend Development >PHP Tutorial >Use PHP-Barcode to easily generate barcodes (1)
Recently, due to work needs, I studied how to generate barcodes in PHP. Although QR codes are more popular nowadays, barcodes are still widely used and irreplaceable. There are many articles in the garden about using PHP to generate barcodes, basically all of which focus on Barcode Bakery. Although it is powerful, it has unfriendly commercial support. Downloading the source code is only for study and research. In order to avoid legal issues, today I recommend an open source and free class library to everyone. PHP-Barcode has good commercial support and is sufficient for general application functions. In addition, the official website also provides online examples to experience its powerful functions. Click here to download the latest version from the official website.
After downloading, run it first. Here is my configuration:
1) Unzip the downloaded package
2) Move all the unzipped files to the root directory of the website (~/Projects/test-barcode. com/)
3) Open all PHP files in it and modify the PHP declaration tag. Change ?> to
4) Visit the virtual site, http://localhost:8090/barcode.php. If everything goes well, you will be able to see the barcode
For a more detailed introduction, I I will update them all when I have time~~
The above introduces the use of PHP-Barcode to easily generate barcodes (1), including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.