1
This commit is contained in:
@@ -1961,12 +1961,12 @@ class Article extends Base
|
||||
foreach ($data['list'] as $v){
|
||||
$insert['article_id'] = $data['article_id'];
|
||||
if($v['type']==0){
|
||||
$insert['table'] = $data['table'];
|
||||
$insert['html_data'] = $data['html_data'];
|
||||
$insert['table'] = $v['table'];
|
||||
$insert['html_data'] = $v['html_data'];
|
||||
$insert['type'] = 0;
|
||||
}else{
|
||||
$insert['type'] = 1;
|
||||
$insert['url'] = $data['url'];
|
||||
$insert['url'] = $v['url'];
|
||||
}
|
||||
$insert['ctime'] = time();
|
||||
$this->article_table_obj->insert($insert);
|
||||
@@ -2250,24 +2250,6 @@ class Article extends Base
|
||||
foreach ($file_runs as $v){
|
||||
$insert['article_id'] = $article_id;
|
||||
$insert['image'] = $article_id."/".$v;
|
||||
// if(strtolower(pathinfo($v,PATHINFO_EXTENSION))=="emf"){
|
||||
// $imagick = new \Imagick();
|
||||
// $formats = $imagick->queryFormats();
|
||||
//// var_dump($formats);die;
|
||||
// $inputPath = ROOT_PATH."public/articleImage/".$article_id."/".$v;
|
||||
// // 确保文件读取成功
|
||||
// $imagick->readImage($inputPath);
|
||||
// $outputPath = ROOT_PATH."public/articleImage/".$article_id."/".substr($v,0,-3)."jpg";;
|
||||
// // 确保转换成功并写入文件
|
||||
// if ($imagick->setImageFormat('jpg') && $imagick->writeImage($outputPath)) {
|
||||
// echo "Image successfully written to: " . $outputPath; // Debugging output
|
||||
// $imagick->clear();
|
||||
// $imagick->destroy();
|
||||
// $insert['jpg_url'] = $article_id."/".substr($v,0,-3)."jpg";
|
||||
// } else {
|
||||
// echo "Image writing failed!"; // Debugging output
|
||||
// }
|
||||
// }
|
||||
$insert['ctime'] = time();
|
||||
$this->article_image_obj->insert($insert);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user