定制 dynamsoftsamples/php-barcode-com-component 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dynamsoftsamples/php-barcode-com-component

Composer 安装命令:

composer require dynamsoftsamples/php-barcode-com-component

包简介

Dynamsoft Barcode Reader SDK for PHP - Implement Barcode Recognition to Your App

README 文档

README

This is the COM component for making PHP barcode reader.

Getting Started

  1. Create a new project named test. Under the project root directory, create two php files - test.php and readbarcode.php. Then copy dynamsoftbarcodereader.php from the SDK package to the project folder.

  2. Edit test.php as follows:

    <html>
    <head/>
    <body>
        <h1>Dynamsoft Barcode Reader PHP Simple Sample</h1>
        <form action="readbarcode.php" method="post" enctype="multipart/form-data">
            Select barcode image:
            <input type="file" name="barcodefile" id="barcodefile" accept="image/*" /><br/>
            <input type="submit" value="Read Barcode" name="submit"/>
        </form>
    </body>
    </html>
    

    Edit readbarcode.php as follows:

    <?php
    include "dynamsoftbarcodereader.php";
    
    $uploadfile = $_FILES["barcodefile"]["tmp_name"];
    
    $br = new BarcodeReader();
    $br->initLicense("<your license key here>");
    $br->decodeFile($uploadfile);
    
    $cnt = $br->getBarcodesCount();
    echo "Barcode Count: $cnt <br />";
    for ($i = 0; $i < $cnt; $i++) {
        $res = $br->getBarcodeResult($i);
        echo "$i. $res->BarcodeFormatString , $res->BarcodeText<br />";
    }
    ?>
    

    Please replace < your license key here > with valid values. The licenses can be found in the [INSTALL FOLDER]\LicenseManager.exe.

  3. Suppose you deploy the sample to WampServer, please copy test folder to [WampServer ROOT PATH]\www folder. Start your WampServer and visit http://[ip]:[port]/test/test.php to verify if it works.

    **Note: ** If you recieve the "Class 'COM' not found" error, please check whether the COM extension is enable in php.ini:

    extension=php_com_dotnet.dll
    

统计信息

  • 总下载量: 43
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 4
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2016-01-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固