Resource.php
457 字节
<?php
namespace app\common\controller;
use Qiniu\Auth;
use tinymeng\code\Generate;
class Resource
{
/**
* 生成条形码
* @param $res
* @return false|string
*/
public static function StudyBar($res){
$generate = Generate::bar();
$file_path = $generate->create($res,true,true,4,40);
$file_path = substr($file_path,strripos($file_path,"public")+6);
return $file_path;
}
}