2007년 10월 25일 목요일

[Ajax] file을 그냥 call을 하면 한글때문에 절단 난다, reader를 사용해서 파일을 읽어야 함

<?
header("Content-type: text/html; charset=euc-kr");

switch ($type)
{
    case "menu":
        $file = "menu.htm";
        break;

    default :
        $file = $template . ".htm";
        break;
}

$master_code = substr( $template, 0,1 );
$_location = "${master_code}/" . $file;

// is exist check 없넹~~귀챦아~

readfile($_location);
?>

댓글 없음:

댓글 쓰기