php 버전에 따른 스킨 오류

php 버전에 따른 스킨 오류

QA

php 버전에 따른 스킨 오류

본문

안녕하세요

기존에 단독서버에서 카페24로 서버 이전을 했습니다.

기존에는 php 5.5 mysql 5.5 그누보드 g5 였구요

카페24 측에서 php버전이 낮아서 설치가 어렵다고해서

PHP7.0, mariadb-10.0 으로 변경하고 세팅했습니다.

그랬더니 거의 다 잘 되는데

기존에 게시판 몇개에 g4 스킨을 사용중이었는데 (그누보드는 g5입니다)

잘 되던게 이전 후에는 오류가 나서 아예 리스트를 불러오지를 못하네요..

어떤 문제인지 알려주실 분 계신가요?

 

 

못불러오는 소스의 일부입니다

<table class="table div-table sun-table">

                <tr>

                  <td>

                

<script language=javascript>

function my_menu_add() { 

if (confirm("'<? 

  if($bo_table) {

  if($board[bo_subject]!='')  { 

  echo "$board[bo_subject]";

  }} 

  ?>' 을 등록하시겠습니까?")) { 

   hiddenframe.location.href = "../bbs/my_menu_add.php?bo_table=<?=$bo_table?>";

}}</script>

 

                  </td>

                  <td><div align="right">

                  <img src="<?=$board_skin_url?>/img/year/<?=$year?>.gif">

                  

                  <a href="<?="$_SERVER[PHP_SELF]?bo_table=$bo_table&"?>

                  

                  <?if ($month == 1)

                  {

                      $year_pre=$year-1; $month_pre=$month; 

 

                 } else {

                    

                    $year_pre=$year-1; $month_pre=$month;

                } 


 

                          echo ("year=$year_pre&month=$month_pre");?>" target="_self" onfocus="this.blur()">

                          <img src="<?=$board_skin_url?>/img/y_prev.gif" border="0" title="<?=$year_pre?>년" align="abbottom">

                          </a> 

                          

                          

                     <a href="<?="$_SERVER[PHP_SELF]?bo_table=$bo_table&"?>

                     

                     <?if ($month == 12) 

                     

                     { 

                         $year_pre=$year+1; $month_pre=$month; 

                         

                    } else {

                        

                        $year_pre=$year+1; $month_pre=$month;

                        

                    } 

                    

                    echo ("&year=$year_pre&month=$month_pre");?>" target="_self" onfocus="this.blur()">

 

                    <img src="<?=$board_skin_url?>/img/y_next.gif" border="0" title="<?=$year_pre?>년" align="abbottom">

                    

                    </a>

                    

                    <img src="<?=$board_skin_url?>/img/month/<?=$month?>.gif"> 

                    

                    <a href="<?="$_SERVER[PHP_SELF]?bo_table=$bo_table&"?>

                    





 

                    <?if ($month == 1) 

                    

                    { 

                        $year_pre=$year-1; $month_pre=12; 

                    

                    } else {

                        

                        $year_pre=$year; $month_pre=$month-1;

 

                    } 

                    

                    echo ("year=$year_pre&month=$month_pre");?>" target="_self" onfocus="this.blur()">

 

                    <img src="<?=$board_skin_url?>/img/m_prev.gif" border="0" title="<?=$month_pre?>월" align="abbottom">

 

                    </a> 

                    

                    <a href="<?="$_SERVER[PHP_SELF]?bo_table=$bo_table&"?>

                    

                    <?if ($month == 12) 

 

                    { 

                        $year_pre=$year+1; $month_pre=1; 

                    

                    } else {

                        $year_pre=$year; $month_pre=$month+1;

                        

                        } echo ("&year=$year_pre&month=$month_pre");?>" target="_self" onfocus="this.blur()">

                        

                        <img src="<?=$board_skin_url?>/img/m_next.gif" border="0" title="<?=$month_pre?>월" align="abbottom">

                        

                        </a>

 

                    </div>

                        

                </td>

                </tr>

               

              </table>

             

              

이 질문에 댓글 쓰기 :

답변 5

점심먹고 잠깐 코드를 변경해봤습니다

 

<table class="table div-table sun-table">
    <tr>
        <td>
            <script language=javascript>
                function my_menu_add() { 
                    if (confirm("'<?php
                        if($bo_table) {
                        if($board['bo_subject']!='')  { 
                        echo $board['bo_subject'];
                        }} 
                    ?>' 을 등록하시겠습니까?")) { 
                    hiddenframe.location.href = "<?php echo G5_BBS_URL; ?>/my_menu_add.php?bo_table=<?php echo $bo_table; ?>";
                }}
            </script>
        </td>
        <td>
            <div align="right">
                <img src="<?php echo $board_skin_url; ?>/img/year/<?php echo $year; ?>.gif">
                <a href="<?php echo "{$_SERVER['PHP_SELF']}?bo_table={$bo_table}&";
                    if ($month == 1) {
                        $year_pre=$year-1; $month_pre=$month; 
                    } else {
                        $year_pre=$year-1; $month_pre=$month;
                    } 
                    echo "year={$year_pre}&month={$month_pre}"; ?>" target="_self" onfocus="this.blur()">
                    <img src="<?php echo $board_skin_url; ?>/img/y_prev.gif" border="0" title="<?php echo $year_pre; ?>년" align="abbottom">
                </a> 
                <a href="<?php echo "{$_SERVER['PHP_SELF']}?bo_table={$bo_table}&";
                    if ($month == 12) { 
                         $year_pre=$year+1; $month_pre=$month; 
                    } else {
                        $year_pre=$year+1; $month_pre=$month;
                    } 
                    echo "&year={$year_pre}&month={$month_pre}";
                    ?>" target="_self" onfocus="this.blur()">
                    <img src="<?php echo $board_skin_url; ?>/img/y_next.gif" border="0" title="<?php echo $year_pre; ?>년" align="abbottom">
                </a>
                <img src="<?php echo $board_skin_url; ?>/img/month/<?php echo $month; ?>.gif"> 
                <a href="<?php echo "{$_SERVER['PHP_SELF']}?bo_table={$bo_table}&";
                    if ($month == 1) 
                    { 
                        $year_pre=$year-1; $month_pre=12; 
                    } else {
                        $year_pre=$year; $month_pre=$month-1;
                    } 
                    echo "year=${year_pre}&month={$month_pre}"; ?>" target="_self" onfocus="this.blur()">
                    <img src="<?php echo $board_skin_url; ?>/img/m_prev.gif" border="0" title="<?php echo $month_pre; ?>월" align="abbottom">
                </a> 
                <a href="<?php echo "{$_SERVER['PHP_SELF']}?bo_table={$bo_table}&";
                    if ($month == 12) { 
                        $year_pre=$year+1; $month_pre=1; 
                    } else {
                        $year_pre=$year; $month_pre=$month+1;
                    } 
                    echo "&year={$year_pre}&month={$month_pre}";
                    ?>" target="_self" onfocus="this.blur()">
                    <img src="<?php echo $board_skin_url; ?>/img/m_next.gif" border="0" title="<?php echo $month_pre; ?>월" align="abbottom">
                </a>
            </div>
        </td>
    </tr>
  </table>

<?if ($month == 1)  이렇게 사용하면 안됩니다

<? if ($month == 1) 또는 <?php if ($month == 1)  이렇게 사용해야 합니다

<? 뒤에 공백없이 문자가 연결되면 에러가 발생합니다

https://www.happyjung.com/lecture/2934  참고하세요

버전이 올라가면서 기존에 있던 명령어들이 사라졌을수도있습니다

 

예를들어 <?= ?>를 <?php echo ?> 형식으로 변경을 해보신다거나

 

버전업에 관련된 문제라 여러가지로 확인이 필요해보이네요

$_SERVER[PHP_SELF] 이렇게 된것을

$_SERVER['PHP_SELF'] 이런식으로 변경해야 합니다

물론 이때는 앞뒤에 ' 가 다른 역할을 하는지 확인하고 해야합니다

상황에 따라 그에 맞게 처리해야한다는 거죠.

답변을 작성하시기 전에 로그인 해주세요.
전체 123,117 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT