生成和读取条形码 [英] Generating and reading barcode
问题描述
我为一家拥有国家办事处的大公司建立了一个电子购物网站。
I've built an e-shopping website for a big company which has country offices.
我想要做的是以下:
- 在发送包裹到公司国家办公室之前通过PHP生成条形码
- 当商品抵达国家办公室时,工作人员将登录自己的帐户,通过条码阅读器
只有通过网络界面才能实现?我的意思是没有任何本地应用程序。怎么做? PLease说明。
Is it possible only with web interface? I mean without any local application. How to do that? PLease explain.
推荐答案
所以这里是一个可以为你工作的方法:
so here is an approach that could work for you:
您需要在数据库中添加记录,如:
You need to put a record in a database like:
package_id | name | status
1234 My Package shipped
生成包含package_id的条形码,您必须决定要使用哪种类型的条形码。您还可以使用数据矩阵。然后您创建条形码作为图像,以便您可以打印。数据矩阵非常适合大型自定义数据。
Generate a barcode which contains the package_id, you have to decide what kind of barcode you want to use. You could also use a data matrix. Then you create the bar code as image so that you can print it. Data Matrix is very good for large custom data.
- 一个jQuery条形码生成器: http://barcode-coder.com/en/barcode-online-generator-2.html
- A jQuery Barcode Generator: http://barcode-coder.com/en/barcode-online-generator-2.html
打印条形码,放在包装上
Print the bar code, put it on your package
包裹到达办公室,用户登录到您的网站,点击确认包裹接收或任何。然后有一个文本字段,他聚焦文本字段,扫描条形码/数据矩阵,您的包ID1234将出现在文本字段中
The package arrives at the office, the user logs on to your website, clicks on "Confirm Package Received" or whatever. Then there is a text-field, he focuses the text-field, scans the barcode/data matrix and your package ID "1234" will appear in the text-field
提交表单,在数据库中查找条目,将其更改为:
Submit the form, lookup the entry in the database, change it to:
package_id | name | status
1234 My Package delivered
提示 a QR Code 它可以被许多手机读取,所以你不需要一个真正的酒吧代码扫描器。您可以编写一个读取条形码的应用程序,并将package_id发送到您的服务器。
A Tip If you use a QR Code it can be read by many mobile phones, so you don't need a real bar code scanner. You could write an app that reads the bar code and sends the package_id to your server.
这篇关于生成和读取条形码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!