채택완료

서버이전 후 섬네일과의 전쟁

2016-08-10 (수) 14:14:50 2,885

서버이전후 일주일간 섬네일과 전쟁을 치루고 있습니다.

문제는 아래 코드(dq_thumb_engine2.php)를 PHP5.4.3버전에 맞게 수정을 하면 섬네일이 생성이 안됩니다. 그대로 놔두면 에러는 나지만 섬네일은 생성되구요...

아무래도 제가 제대로 수정을 못한것 같은데 아시는분 있으면 답변 부탁드립니다.

아래는 원본입니다.

Copy
if ($tag_str && @eregi($HH, $tag_str)){{    if(!@preg_match("/www./",$_SERVER[HTTP_HOST]) && preg_match("/www./",$tag_str)) {     $tag_str=str_replace("www.","",$tag_str);     $tag_str=get_indexDir()."/".eregi_replace($HH."/","",eregi_replace("http://","",$tag_str));    } elseif(preg_match("/www./",$_SERVER[HTTP_HOST]) && !preg_match("/www./",$tag_str)) {     $tag_str=get_indexDir()."/".eregi_replace($HH."/","",eregi_replace("http://","",$tag_str));     } else $tag_str=get_indexDir()."/".eregi_replace($_SERVER[HTTP_HOST]."/","",eregi_replace("http://","",$tag_str));

아래가 수정된 코드입니다.

Copy
if ($tag_str && @preg_match('/'.$HH.'/',tag_str)){    if(!@preg_match("/www./",$_SERVER[HTTP_HOST]) && preg_match("/www./",$tag_str)) {     $tag_str=str_replace("www.","",$tag_str);     $tag_str=get_indexDir()."/".eregi_replace($HH."/","",eregi_replace("http://","",$tag_str));    } elseif(preg_match("/www./",$_SERVER[HTTP_HOST]) && !preg_match("/www./",$tag_str)) {     $tag_str=get_indexDir()."/".eregi_replace($HH."/","",eregi_replace("http://","",$tag_str));    } else $tag_str=get_indexDir()."/".preg_replace("/{$_SERVER[HTTP_HOST]}.\//","",preg_replace("/http:\/\//","",$tag_str));

아시는분 계시면 답변부탁드릴게요... 감사합니다.

|

답변 1개

채택된 답변
+20 포인트

어떤 에러인데요? 

답변을 작성하려면 로그인이 필요합니다.