|
@@ -65,7 +65,7 @@ class CronAction extends Action {
|
|
|
"MinImgAverageRgb" => 70
|
|
|
);
|
|
|
|
|
|
- $backImgLocalPath = './Public/images/back.jpg';
|
|
|
+ $backImgLocalPath = ENTRY_PATH .'/Public/images/back.jpg';
|
|
|
$upload = new \Jms\File\Oss2($config);
|
|
|
//电子车牌背部固定图片第一次上传至oss
|
|
|
$plateBackOssUrl = S('czapp_cache_plate_oss_url');
|
|
@@ -400,7 +400,7 @@ class CronAction extends Action {
|
|
|
|
|
|
$im = imagecreatetruecolor(500, 278); // 设置画布
|
|
|
//$bg = imagecreatefromjpeg('bg.jpg'); // 设置背景图片
|
|
|
- $front_img = './Public/images/front.jpg';
|
|
|
+ $front_img = ENTRY_PATH . '/Public/images/front.jpg';
|
|
|
if(!is_file($front_img)){
|
|
|
echo "front_img not existed! front_img: ".$front_img.PHP_EOL;
|
|
|
return false;
|
|
@@ -408,7 +408,7 @@ class CronAction extends Action {
|
|
|
$bg = imagecreatefromjpeg($front_img); // 设置背景图片
|
|
|
imagecopy($im,$bg,0,0,0,0,500,278); // 将背景图片拷贝到画布相应位置
|
|
|
imagedestroy($bg); // 销毁背景图片
|
|
|
- $font = './Public/font/stsong.ttf'; // 设置字体 // 设置字体,这里可以指向ttf文件
|
|
|
+ $font = ENTRY_PATH .'/Public/font/stsong.ttf'; // 设置字体 // 设置字体,这里可以指向ttf文件
|
|
|
if(!is_file($font)){
|
|
|
echo "font file not existed! font: ".$font.PHP_EOL;
|
|
|
return false;
|