使用 optimize 做获取图片宽高目录

master
Jimmy Liow 1 year ago
parent 894bbbc585
commit acbf779d0b

@ -2330,7 +2330,7 @@ class Information extends CI_Controller
}
}
// 集合页面反馈标签
// 集合页面反馈标签
$feedback_city_array = [];
preg_match_all('^<!--@FEEDBACK-CITY-LIST_(.*)@-->^', $information->ic_content, $feedback_city_array);
if (!empty($feedback_city_array)) {
@ -2401,9 +2401,12 @@ class Information extends CI_Controller
$template = str_replace('<!--@OG:IMAGE@-->', '<meta property="og:image" content="' . $full_ic_photo . '"><meta property="og:image:secure_url" content="' . $full_ic_photo . '"><meta property="og:image:width" content="800"><meta property="og:image:height" content="450">', $template);
}
//设置图片尺寸
if (is_dir('D:/wwwroot/origin-images.chinahighlights.com') && is_dir('D:/wwwroot/origin-www.asiahighlights.com')) {
$template = $this->html_optimize_lib->set_image_size_local($template, 'D:/wwwroot/origin-www.asiahighlights.com', 'D:/wwwroot/origin-images.chinahighlights.com');
// 设置图片尺寸
// 优化过图片目录D:\wwwroot\origin-images.chinahighlights.com\optimize\
$www_local_path = 'D:/wwwroot/origin-www.asiahighlights.com';
$image_local_path = 'D:/wwwroot/origin-images.asiahighlights.com/optimize';
if (is_dir($www_local_path) && is_dir($image_local_path)) {
$template = $this->html_optimize_lib->set_image_size_local($template, $www_local_path, $image_local_path);
} else {
$template = $this->html_optimize_lib->set_image_size($template);
}

Loading…
Cancel
Save