우편번호 연결이 안되네요...도와주세요...
<?
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");
?>
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개
dannykim
15년 전
도와주세요~~~
DiZiNOr
15년 전
이렇게만 적어두고 무슨현상인지 알아야 봐드리죠 ;;
l2zeo
15년 전
우편번호 연결이 안된다는 말씀이 무슨 말씀이신지..
해당 주소를 알려주시면 조금이라도 도움이 되드릴거 같은데ㅠ..
해당 주소를 알려주시면 조금이라도 도움이 되드릴거 같은데ㅠ..
게시판 목록
토크
개발과 관련된 어떤 얘기도 괜찮습니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 30 |
nooree
|
17년 전 | 1642 | |
| 29 |
|
17년 전 | 2135 | |
| 28 | 17년 전 | 2314 | ||
| 27 | 17년 전 | 3798 | ||
| 26 | 17년 전 | 2938 | ||
| 25 | 17년 전 | 2107 | ||
| 24 | 17년 전 | 2052 | ||
| 23 | 17년 전 | 1972 | ||
| 22 |
|
17년 전 | 2173 | |
| 21 | 17년 전 | 1738 | ||
| 20 | 17년 전 | 2213 | ||
| 19 |
사랑합니다
|
17년 전 | 1703 | |
| 18 | 17년 전 | 4072 | ||
| 17 | 17년 전 | 2900 | ||
| 16 |
|
17년 전 | 1736 | |
| 15 |
심심맨닷컴
|
17년 전 | 1996 | |
| 14 | 17년 전 | 2045 | ||
| 13 | 17년 전 | 2460 | ||
| 12 | 17년 전 | 1940 | ||
| 11 |
심심맨닷컴
|
17년 전 | 1846 | |
| 10 | 17년 전 | 2546 | ||
| 9 |
eclub
|
17년 전 | 2300 | |
| 8 | 17년 전 | 2465 | ||
| 7 | 17년 전 | 2114 | ||
| 6 |
stuartkim
|
17년 전 | 2537 | |
| 5 |
stuartkim
|
17년 전 | 2199 | |
| 4 | 17년 전 | 2019 | ||
| 3 |
사랑과우정
|
17년 전 | 5006 | |
| 2 | 17년 전 | 3142 | ||
| 1 | 17년 전 | 2359 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기