// 이미지 src 추출preg_match_all('/]*src=["\']?([^>"\']+)["\']?[^>]*>/i', $input_text, $img_no);$img_src = $img_no[1][0] ?? '';if ($img_src) { // 파일명 추출 $filename = basename(parse_url($img_src, PHP_URL_PATH)); // 쿼리스트링 제거 // 저장 경로 설정 $source_path = $target_path = G5_DATA_PATH . '/file/' . $bo_table; $file_download = $target_path . '/' . $filename; // 디렉토리 없으면 생성 if (!is_dir($targ..