테스트 사이트 - 개발 중인 베타 버전입니다

우편번호 연결이 안되네요...도와주세요...

<?
include_once("./_common.php");
/* 기존의 DB에서 불러오는 방식
if ($addr1)
{
$zipfile = file("./zip.db");
$search_count = 0;

while ($zipcode = each($zipfile))
{
if(strstr(substr($zipcode[1],9,512), $addr1))
{
$list[$search_count][zip1] = substr($zipcode[1],0,3);
$list[$search_count][zip2] = substr($zipcode[1],4,3);
$addr = explode(" ", substr($zipcode[1],8));

if ($addr[sizeof($addr)-1])
{
$list[$search_count][addr] = str_replace($addr[sizeof($addr)-1], "", substr($zipcode[1],8));
$list[$search_count][bunji] = trim($addr[sizeof($addr)-1]);
}
else
$list[$search_count][addr] = substr($zipcode[1],8);

$list[$search_count][encode_addr] = urlencode($list[$search_count][addr]);
$search_count++;
}
}

if (!$search_count) alert("찾으시는 주소가 없습니다.");
}
*/

if ($addr1)
{

//$sql = " select * from zipcode where zp_dong like '%$addr1%' order by zp_sido, zp_gugun, zp_dong ";
$sql = " select * from $g4[zipcode] where zp_dong like '%$addr1%' order by zp_sido, zp_gugun, zp_dong ";
echo $sql;
//echo '<xmp>';
//print_r($g4);
//echo '</xmp>';

$result = mysql_query($sql);
$search_count = 0;
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$list[$i][zip1] = substr($row[zp_code], 0, 3);
$list[$i][zip2] = substr($row[zp_code], 3, 3);
$list[$i][addr] = "$row[zp_sido] $row[zp_gugun] $row[zp_dong]";
$list[$i][bunji] = $row[zp_bunji];
$list[$i][encode_addr] = urlencode($list[$i][addr1]);
$search_count++;
}

if (!$search_count)
alert("찾으시는 주소가 없습니다.");
}


$g4[title] = "우편번호 검색";
include_once("$g4[path]/ahead.sub.php");

$member_skin_path = "$g4[path]/skin/member/$config[cf_member_skin]";
include_once("$member_skin_path/zip.skin.php");

include_once("$g4[path]/tail.sub.php");
?>

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 3개

이렇게만 적어두고 무슨현상인지 알아야 봐드리죠 ;;
우편번호 연결이 안된다는 말씀이 무슨 말씀이신지..

해당 주소를 알려주시면 조금이라도 도움이 되드릴거 같은데ㅠ..

게시글 목록

번호 제목
21248
13844
529
13842
526
29537
518
502
13840
25293
21244
29532
25288
29531
500
13836
21241
495
13832
25283
21236
13830
490
21220
21217
25277
25276
25275
484
13827
13825
13819
29529
13813
479
21211
25273
478
21201
25272
21189
477
476
21185
474
21181
21175
472
470
469
467
465
21168
25267
463
21164
21161
458
21146
457
13807
454
29528
451
447
21127
21122
25262
25254
21119
25251
25243
25239
21112
442
21103
25233
25222
25230
441
21100
25215
21097
21091
25212
25210
25209
21083
21080
439
438
436
25200
21066
25195
21055
21051
25192
21040
13803