PHP code example of tinymeng / code

1. Go to this page and download the library: Download tinymeng/code library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

tinymeng / code example snippets


use tinymeng\code\Generate;
$generate = Generate::bar();

/** 直接输出图片 */
$generate->create("123456789");

/** 直接输出图片下面显示数字 */
//$generate->create("123456789",true);

/** 条形码存入本地并输出存储路径 */
//$file_path = $generate->create("123456789",true);
//var_dump($file_path);

use tinymeng\code\Generate;
$generate = Generate::qr();

/** 直接输出图片 */
$generate->create("123456789");


/** 二维码存入本地并输出存储路径 */
//$file_path = $generate->create("123456789",true);
//var_dump($file_path);