Recently, due to work needs, I have studied how PHP generates barcodes. 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, its commercial support is not friendly. 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 decompressed 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 more detailed usage introduction, I will update it when I have time~~