PHP5生成条形码的简单实例
该软件支持PHP4和PHP5两个版本,本文中使用的是PHP5的版本。在使用前注意要将PHP的GD模块开启。在Windows中为php_gd2.dll,Linux中为gd.so。将压缩文件解压到Apache,执行http://localhost/barcode/index.php。PHP5生成条形码见下图:
1. Type:选择条形码类型
2. Output:输出的图片格式
3. Thickness:条形码高度
4. Resolution:条形码大小
5. Font:条形码下方的文字大小,也可不显示文字
6. Text:条形码打印的内容
498)this.width=498;' onmousewheel = 'javascript:return big(this)' alt=条码效果 src="http://www.bkjia.com/uploadfile/2013/0904/20130904094617982.jpg" width=615 height=557>
当然,这个PHP5生成条形码程序只是将文字生成为条形码,但使用时不能灵活将其嵌入其他PHP程序,我将压缩包里面的test.php做了一些调整,使其能灵活的用于其他程序。运行时只需将条码类型和文字传给test.php即可,例如:
http://localhost/barcode/test.php?codebar=BCGcode39&text=20090729
或运行 http://localhost/barcode/mytest.php
mytest.php代码:
<span style="COLOR: #0000ff"><pre class="brush:php;toolbar:false"><ol class="dp-xml"><li class="alt"><span><strong><font color="#006699"><span class="tag"><span class="tag-name">img</span></span></font></strong><span><font color="#000000"> </font></span><span class="attribute"><font color="#ff0000">src</font></span><span><font color="#000000">=</font></span><span class="attribute-value">"test.php?codebar=BCGcode39&text=20090729"</span><span class="tag"><strong><font color="#006699">></font></strong></span><span><font color="#000000"> </font></span></span></li></ol>
<span style="COLOR: #0000ff"></span>PHP5生成条形码效果图:
498)this.width=498;' onmousewheel = 'javascript:return big(this)' alt=运行实例效果图 src="http://www.bkjia.com/uploadfile/2013/0904/20130904094617379.jpg" width=665 height=186>
PHP5生成条形码test.php代码:
<span style="COLOR: #0000ff"><pre class="brush:php;toolbar:false"><ol class="dp-c"> <li class="alt"><span><span><font color="#000000"><?php </FONT></font></span></span></li> <li> <span></span><span class="comment"><font color="#008200">// Including all required classes </font></span><span><font color="#000000"> </font></span> </li> </ol>
throw $e; //重掷异常
}
}
?﹥

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

CrystalDiskMark is a small HDD benchmark tool for hard drives that quickly measures sequential and random read/write speeds. Next, let the editor introduce CrystalDiskMark to you and how to use crystaldiskmark~ 1. Introduction to CrystalDiskMark CrystalDiskMark is a widely used disk performance testing tool used to evaluate the read and write speed and performance of mechanical hard drives and solid-state drives (SSD). Random I/O performance. It is a free Windows application and provides a user-friendly interface and various test modes to evaluate different aspects of hard drive performance and is widely used in hardware reviews

CrystalDiskInfo is a software used to check computer hardware devices. In this software, we can check our own computer hardware, such as reading speed, transmission mode, interface, etc.! So in addition to these functions, how to use CrystalDiskInfo and what exactly is CrystalDiskInfo? Let me sort it out for you! 1. The Origin of CrystalDiskInfo As one of the three major components of a computer host, a solid-state drive is the storage medium of a computer and is responsible for computer data storage. A good solid-state drive can speed up file reading and affect consumer experience. When consumers receive new devices, they can use third-party software or other SSDs to

The meaning and difference of PHP version NTS PHP is a popular server-side scripting language that is widely used in the field of web development. There are two main versions of PHP: ThreadSafe(TS) and Non-ThreadSafe(NTS). On the official website of PHP, we can see two different PHP download versions, namely PHPNTS and PHPTS. So, what does PHP version NTS mean? What is the difference between it and the TS version? Next,

When we use the Edge browser, sometimes incompatible software attempts to be loaded together, so what is going on? Let this site carefully introduce to users how to solve the problem of trying to load incompatible software with Edge. How to solve an incompatible software trying to load with Edge Solution 1: Search IE in the start menu and access it directly with IE. Solution 2: Note: Modifying the registry may cause system failure, so operate with caution. Modify registry parameters. 1. Enter regedit during operation. 2. Find the path\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Micros

Regarding Llama3, new test results have been released - the large model evaluation community LMSYS released a large model ranking list. Llama3 ranked fifth, and tied for first place with GPT-4 in the English category. The picture is different from other benchmarks. This list is based on one-on-one battles between models, and the evaluators from all over the network make their own propositions and scores. In the end, Llama3 ranked fifth on the list, followed by three different versions of GPT-4 and Claude3 Super Cup Opus. In the English single list, Llama3 overtook Claude and tied with GPT-4. Regarding this result, Meta’s chief scientist LeCun was very happy and forwarded the tweet and

PhotoshopCS is the abbreviation of Photoshop Creative Suite. It is a software produced by Adobe and is widely used in graphic design and image processing. As a novice learning PS, let me explain to you today what software photoshopcs5 is and how to use photoshopcs5. 1. What software is photoshop cs5? Adobe Photoshop CS5 Extended is ideal for professionals in film, video and multimedia fields, graphic and web designers who use 3D and animation, and professionals in engineering and scientific fields. Render a 3D image and merge it into a 2D composite image. Edit videos easily

The Chrome browser is currently the browser with the largest number of users and high praise, and is committed to providing users with a comprehensive and fast experience. Some netizens feel that the old version is still easier to use after updating Google Chrome. If they want to downgrade the version of Google Chrome, what should they do? Let’s take a look at the detailed operation method of downgrading Google Chrome! The specific method of downgrading Chrome is to close the Chrome process, open the directory where chrome.exe is located (Application), delete chrome.exe, rename old_chrome.exe to chrome.exe, and delete the \UserData\Default\Web Data file (do not delete this

CorelDRAW software is a vector graphics production tool software produced by Corel. It is mainly used for vector graphics, page design and image editing. Next, let the editor introduce to you what software coreldraw is? How to download the official free version of cdr2022! 1. What software is coreldraw? The origin of CorelDRAW. The full name of CorelDRAW software is CorelDRAW. It is a graphic design software for producing vector graphics. CorelDRAWX4 has been updated and optimized in text format, new interactive tables and page layer functions. CorelDRAWX4 supports online service integration and collaboration. As a graphic image tool and vector drawing software, it
