이제 PHP 걸음마입니다. > 그누3질답

그누3질답

이제 PHP 걸음마입니다. 정보

이제 PHP 걸음마입니다.

본문

아래의 소스가 맞는지 모르겟네요..
값을 받아서 조건문에서 확인하고 값을 넘겨야 하는데..
잘 되지 않네요.
고수님 어떤부분이 틀렸나요...

<? if ($bo_table=="bus" && &wr_id==4) {
        $bo_dir="info"
        $s_t_num="greet";
    } else if ($bo_table=="bus" && &stext==3) {
        $bo_dir="info"
        $s_t_num="slogan";
        $c_t_num="slogan";
    } else if ($bo_table=="institution") {
        $bo_dir="intro"
        $s_t_num="institution";
        $c_t_num="institution";
  } else if ($bo_table=="bus" && &stext==1) {
        $bo_dir="album"
        $s_t_num="bus";
        $c_t_num="bus";
  } else if ($bo_table=="book") {
        $bo_dir="book"
        $s_t_num="book";
        $c_t_num="book";
  } else {
        $bo_dir="info"
        $s_t_num="greet";
  }
?>

<? include $n_board."menu.htm"; ?>

<table width="100%" align="right" cellpadding="0" cellspacing="0">
  <tr>
    <td width="100%">&nbsp;</td>
    <td width="50"><a href="index.php" target="_parent"><img src="../images/sub_search_title_home.gif" width="86" height="20" border="0"></a></td>
    <td width="10"><img src="../images/sub_search_title_arrow.gif" width="10" height="20" border="0"></td>
    <td width="50"><img src="<?=$bo_dir?>/images/search_title.gif" width="74" height="20" border="0"></td>
    <td width="10"><img src="../images/sub_search_title_arrow.gif" width="10" height="20" border="0"></td>
    <td width="50"><img src="<?=$bo_dir?>/images/search_title_<?=$s_t_num?>.gif" border="0"></td>
    <td width="50">&nbsp;</td>
  </tr>
</table>

위의 소스가 정상적인가요..
아무리 해도 화면이 나타나지 않습니다.
고수님의 답변을 기다리며...
  • 복사

댓글 전체

한가지만 더 질문입니다..

<? include $n_board."menu.htm"; ?>  <---맞나요

와 같이 include안에 또 다른 값을 입력할려고 합니다.
위의 소스가 맞나요..
틀리다면 코멘트로 소스 코딩을 부타드립니다.
include 안에 또다른 include 를 할 경우 각각의 파일이 위치한 경로를 확인해서 include 하시면 됩니다.

위 코드상으로는 왜 아무 화면도 나타나지 않는지 정확히 판단하기 어렵습니다.

자동차를 예를 들면, 자동차가 움직이지 않으면 여러 원인이 있습니다.
당장은 움직이지 않으니 엑셀레이터등을 살펴보겠으나, 여러 관련된 부분이 있을 수 있습니다.
코드도 마찬가지 입니다.
위의 코드가 어디서 어떻게 넘어오고, 실행되는 페이지에서 어떻게 처리되는지의 내용이 없는데 어떻게 도움글을 드려야 할지요..
© SIRSOFT
현재 페이지 제일 처음으로